serial: 8250: Fix UART_BUG_TXEN workaround
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 <39f6f95327b31d796f8d305a29df43b1d585e3cf@softplc.com>
[pjh: rewrote commit log]
Signed-off-by: Peter Hurley <4b8373d016f277527198385ba72fda0feb5da015@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <4645f7897fd33786a2ee1264d590b3c400559d85@linuxfoundation.org>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs