From db106df32d679db151b48a09543b03ee41cb2580 Mon Sep 17 00:00:00 2001 From: Peter Hurley Date: Tue, 2 Sep 2014 17:39:15 -0400 Subject: 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 cc: Signed-off-by: Peter Hurley Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/sunhv.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/tty/serial/sunhv.c') 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) { -- cgit v1.2.3