aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux/linux-xlnx/3.14/tty-xuartps-Fix-RX-hang-and-TX-corruption-in-set_termios.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-kernel/linux/linux-xlnx/3.14/tty-xuartps-Fix-RX-hang-and-TX-corruption-in-set_termios.patch')
-rw-r--r--recipes-kernel/linux/linux-xlnx/3.14/tty-xuartps-Fix-RX-hang-and-TX-corruption-in-set_termios.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-xlnx/3.14/tty-xuartps-Fix-RX-hang-and-TX-corruption-in-set_termios.patch b/recipes-kernel/linux/linux-xlnx/3.14/tty-xuartps-Fix-RX-hang-and-TX-corruption-in-set_termios.patch
new file mode 100644
index 00000000..bafd4332
--- /dev/null
+++ b/recipes-kernel/linux/linux-xlnx/3.14/tty-xuartps-Fix-RX-hang-and-TX-corruption-in-set_termios.patch
@@ -0,0 +1,32 @@
+From 397b08fb903994ccaa2d4d7f4cf578c9d3028463 Mon Sep 17 00:00:00 2001
+From: Nathan Rossi <nathan.rossi@xilinx.com>
+Date: Mon, 24 Nov 2014 15:11:43 +1000
+Subject: [PATCH] tty: xuartps: Fix RX hang, and TX corruption in set_termios
+
+Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com>
+---
+ drivers/tty/serial/xilinx_uartps.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c
+index dbbc195..fcb1c50 100644
+--- a/drivers/tty/serial/xilinx_uartps.c
++++ b/drivers/tty/serial/xilinx_uartps.c
+@@ -648,10 +648,10 @@ static void xuartps_set_termios(struct uart_port *port,
+
+ spin_lock_irqsave(&port->lock, flags);
+
+- /* Empty the receive FIFO 1st before making changes */
+- while ((xuartps_readl(XUARTPS_SR_OFFSET) &
+- XUARTPS_SR_RXEMPTY) != XUARTPS_SR_RXEMPTY) {
+- xuartps_readl(XUARTPS_FIFO_OFFSET);
++ /* Wait for the transmit FIFO to empty before making changes */
++ if (!(xuartps_readl(XUARTPS_CR_OFFSET) & XUARTPS_CR_TX_DIS)) {
++ while (!(xuartps_readl(XUARTPS_SR_OFFSET) & XUARTPS_SR_TXEMPTY))
++ cpu_relax();
+ }
+
+ /* Disable the TX and RX to set baud rate */
+--
+2.1.1
+