]> git.baikalelectronics.ru Git - kernel.git/commit
serial: 8250: Fix UART_BUG_TXEN workaround
authorPeter Hurley <peter@hurleysoftware.com>
Mon, 2 Feb 2015 20:47:07 +0000 (15:47 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 7 Feb 2015 10:44:55 +0000 (18:44 +0800)
commita77701bd6eb1cc046e193cde539a6accec72d0ad
treebe18492341b211fc4a1d64aaf8fb5add99e78426
parent5e6cd4cdb81a59a47dc1d4993d398b27eb37d1a6
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>
drivers/tty/serial/8250/8250_core.c