Commit 717f3bba authored by Seth Bollinger's avatar Seth Bollinger Committed by Greg Kroah-Hartman

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: default avatarSeth Bollinger <sethb@digi.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4ea8dafd
...@@ -89,8 +89,7 @@ static void __uart_start(struct tty_struct *tty) ...@@ -89,8 +89,7 @@ static void __uart_start(struct tty_struct *tty)
struct uart_state *state = tty->driver_data; struct uart_state *state = tty->driver_data;
struct uart_port *port = state->uart_port; struct uart_port *port = state->uart_port;
if (!uart_circ_empty(&state->xmit) && state->xmit.buf && if (!tty->stopped && !tty->hw_stopped)
!tty->stopped && !tty->hw_stopped)
port->ops->start_tx(port); port->ops->start_tx(port);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment