summaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial
diff options
context:
space:
mode:
authorOliver Barta <o.barta89@gmail.com>2019-06-19 10:16:39 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-07-14 08:01:10 +0200
commit5a5097cfb0d2689ead3ecf055b58924848e5411e (patch)
tree9f4f24dc25bb3e9c40f14529e0d59e9fa0260cb7 /drivers/tty/serial
parent6517295171086f6f6409090f07d81d233b1bc626 (diff)
downloadlinux-stable-5a5097cfb0d2689ead3ecf055b58924848e5411e.tar.gz
linux-stable-5a5097cfb0d2689ead3ecf055b58924848e5411e.tar.bz2
linux-stable-5a5097cfb0d2689ead3ecf055b58924848e5411e.zip
Revert "serial: 8250: Don't service RX FIFO if interrupts are disabled"
commit 3f2640ed7be838c3f05c0d2b0f7c7508e7431e48 upstream. This reverts commit 2e9fe539108320820016f78ca7704a7342788380. 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: Oliver Barta <o.barta89@gmail.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Fixes: 2e9fe5391083 ("serial: 8250: Don't service RX FIFO if interrupts are disabled") Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial')
-rw-r--r--drivers/tty/serial/8250/8250_port.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c
index d2f3310abe54..682300713be4 100644
--- a/drivers/tty/serial/8250/8250_port.c
+++ b/drivers/tty/serial/8250/8250_port.c
@@ -1869,8 +1869,7 @@ int serial8250_handle_irq(struct uart_port *port, unsigned int iir)
status = serial_port_in(port, UART_LSR);
- if (status & (UART_LSR_DR | UART_LSR_BI) &&
- iir & UART_IIR_RDI) {
+ if (status & (UART_LSR_DR | UART_LSR_BI)) {
if (!up->dma || handle_rx_dma(up, iir))
status = serial8250_rx_chars(up, status);
}