diff options
author | Peter Hurley <peter@hurleysoftware.com> | 2015-02-02 23:47:07 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-02-07 13:44:55 +0300 |
commit | c09babfab7ae8c7d79a5dce9d866fbb28b82dde4 (patch) | |
tree | be18492341b211fc4a1d64aaf8fb5add99e78426 | |
parent | 692132b5b1c5ce97076915d4aed0c61513e18b03 (diff) | |
download | linux-c09babfab7ae8c7d79a5dce9d866fbb28b82dde4.tar.xz |
serial: 8250: Fix UART_BUG_TXEN workaround
UARTs which do not trigger THRE interrupt if the fifo is already
empty when the interrupt is enabled need tx primed manually. These
UARTs are identified by the UART_BUG_TXEN flag to enable the
required workaround.
However, the current workaround is broken; if the fifo is already
empty but the shifter is still transmitting, then serial8250_tx_chars()
will not be called but no further THRE interrupt will occur, and
tx will stall. The appropriate check is for fifo empty (THRE), not
transmitter empty (TEMT).
Signed-off-by: Dick Hollenbeck <dick@softplc.com>
[pjh: rewrote commit log]
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/tty/serial/8250/8250_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c index 46ae9fda68b6..e3b9570a1eff 100644 --- a/drivers/tty/serial/8250/8250_core.c +++ b/drivers/tty/serial/8250/8250_core.c @@ -1388,7 +1388,7 @@ static void serial8250_start_tx(struct uart_port *port) unsigned char lsr; lsr = serial_in(up, UART_LSR); up->lsr_saved_flags |= lsr & LSR_SAVE_FLAGS; - if (lsr & UART_LSR_TEMT) + if (lsr & UART_LSR_THRE) serial8250_tx_chars(up); } } |