aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorSeth Bollinger <sethb@digi.com>2014-03-25 13:55:37 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-04-16 17:17:43 -0400
commit717f3bbab3c7628736ef738fdbf3d9a28578c26c (patch)
tree3cacb3b09404f9717efe37ba43267655d9a3809b /drivers/tty
parent4ea8dafd2475e26b3cee3836bc6e6fddbdfb2721 (diff)
serial_core: Fix conditional start_tx on ring buffer not empty
If the serial_core ring buffer empties just as the tty layer receives an XOFF, then start_tx will never be called when the tty layer receives an XON as the serial_core ring buffer is empty. This will possibly leave a few bytes trapped in the fifo for drivers that disable the transmitter when flow controlled. Signed-off-by: Seth Bollinger <sethb@digi.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/serial_core.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
index 2cf5649a6dc0..dd1a7bef6647 100644
--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c
@@ -89,8 +89,7 @@ static void __uart_start(struct tty_struct *tty)
89 struct uart_state *state = tty->driver_data; 89 struct uart_state *state = tty->driver_data;
90 struct uart_port *port = state->uart_port; 90 struct uart_port *port = state->uart_port;
91 91
92 if (!uart_circ_empty(&state->xmit) && state->xmit.buf && 92 if (!tty->stopped && !tty->hw_stopped)
93 !tty->stopped && !tty->hw_stopped)
94 port->ops->start_tx(port); 93 port->ops->start_tx(port);
95} 94}
96 95