summaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/sunhv.c
diff options
context:
space:
mode:
authorPeter Hurley2014-09-02 23:39:15 +0200
committerGreg Kroah-Hartman2014-09-09 01:22:42 +0200
commitdb106df32d679db151b48a09543b03ee41cb2580 (patch)
treebef38581727c0696e7aac02df61ceb9a8a093685 /drivers/tty/serial/sunhv.c
parentserial: core: Remove unsafe x_char optimization (diff)
downloadkernel-qcow2-linux-db106df32d679db151b48a09543b03ee41cb2580.tar.gz
kernel-qcow2-linux-db106df32d679db151b48a09543b03ee41cb2580.tar.xz
kernel-qcow2-linux-db106df32d679db151b48a09543b03ee41cb2580.zip
serial: Fix send_xchar() handlers
START_CHAR() & STOP_CHAR() can be disabled if set to '\0' (__DISABLED_CHAR). UART drivers which define a send_xchar() handler must not transmit __DISABLED_CHAR. Document requirement. Affected drivers: sunsab sunhv cc: David S. Miller <davem@davemloft.net> cc: <sparclinux@vger.kernel.org> Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/sunhv.c')
-rw-r--r--drivers/tty/serial/sunhv.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/tty/serial/sunhv.c b/drivers/tty/serial/sunhv.c
index 20521db2189f..25d43ce8b318 100644
--- a/drivers/tty/serial/sunhv.c
+++ b/drivers/tty/serial/sunhv.c
@@ -268,6 +268,9 @@ static void sunhv_send_xchar(struct uart_port *port, char ch)
unsigned long flags;
int limit = 10000;
+ if (ch == __DISABLED_CHAR)
+ return;
+
spin_lock_irqsave(&port->lock, flags);
while (limit-- > 0) {