Commit 32a88e92 authored by Oliver Barta's avatar Oliver Barta Committed by Greg Kroah-Hartman

Revert "serial: 8250: Don't service RX FIFO if interrupts are disabled"

commit 3f2640ed upstream.

This reverts commit 2e9fe539.

Reading LSR unconditionally but processing the error flags only if
UART_IIR_RDI bit was set before in IIR may lead to a loss of transmission
error information on UARTs where the transmission error flags are cleared
by a read of LSR. Information are lost in case an error is detected right
before the read of LSR while processing e.g. an UART_IIR_THRI interrupt.
Signed-off-by: default avatarOliver Barta <o.barta89@gmail.com>
Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fixes: 2e9fe539 ("serial: 8250: Don't service RX FIFO if interrupts are disabled")
Cc: stable <stable@vger.kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c02af52b
...@@ -1869,8 +1869,7 @@ int serial8250_handle_irq(struct uart_port *port, unsigned int iir) ...@@ -1869,8 +1869,7 @@ int serial8250_handle_irq(struct uart_port *port, unsigned int iir)
status = serial_port_in(port, UART_LSR); status = serial_port_in(port, UART_LSR);
if (status & (UART_LSR_DR | UART_LSR_BI) && if (status & (UART_LSR_DR | UART_LSR_BI)) {
iir & UART_IIR_RDI) {
if (!up->dma || handle_rx_dma(up, iir)) if (!up->dma || handle_rx_dma(up, iir))
status = serial8250_rx_chars(up, status); status = serial8250_rx_chars(up, status);
} }
......
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