Commit ca8bb4aefb932e3da105f28cbfba36d57a931081

Authored by Sebastian Andrzej Siewior
Committed by Greg Kroah-Hartman
1 parent 045f32dda9

serial: 8250: Revert "tty: serial: 8250_core: read only RX if there is something in the FIFO"

This reverts commit 0aa525d11859c1a4d5b78fdc704148e2ae03ae13.

The conditional RX-FIFO read seems to cause spurious interrupts and we
see just:
|serial8250: too much work for irq29

The previous behaviour was "default" for decades and Marvell's 88f6282 SoC
might not be the only that relies on it. Therefore the Omap fix is
reverted for now.

Fixes: 0aa525d11859 ("tty: serial: 8250_core: read only RX if there is
something in the FIFO")
Reported-By: Nicolas Schichan <nschichan@freebox.fr>
Debuged-By: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Showing 1 changed file with 5 additions and 6 deletions Side-by-side Diff

drivers/tty/serial/8250/8250_core.c
... ... @@ -2138,8 +2138,8 @@
2138 2138 /*
2139 2139 * Clear the interrupt registers.
2140 2140 */
2141   - if (serial_port_in(port, UART_LSR) & UART_LSR_DR)
2142   - serial_port_in(port, UART_RX);
  2141 + serial_port_in(port, UART_LSR);
  2142 + serial_port_in(port, UART_RX);
2143 2143 serial_port_in(port, UART_IIR);
2144 2144 serial_port_in(port, UART_MSR);
2145 2145  
... ... @@ -2300,8 +2300,8 @@
2300 2300 * saved flags to avoid getting false values from polling
2301 2301 * routines or the previous session.
2302 2302 */
2303   - if (serial_port_in(port, UART_LSR) & UART_LSR_DR)
2304   - serial_port_in(port, UART_RX);
  2303 + serial_port_in(port, UART_LSR);
  2304 + serial_port_in(port, UART_RX);
2305 2305 serial_port_in(port, UART_IIR);
2306 2306 serial_port_in(port, UART_MSR);
2307 2307 up->lsr_saved_flags = 0;
... ... @@ -2394,8 +2394,7 @@
2394 2394 * Read data port to reset things, and then unlink from
2395 2395 * the IRQ chain.
2396 2396 */
2397   - if (serial_port_in(port, UART_LSR) & UART_LSR_DR)
2398   - serial_port_in(port, UART_RX);
  2397 + serial_port_in(port, UART_RX);
2399 2398 serial8250_rpm_put(up);
2400 2399  
2401 2400 del_timer_sync(&up->timer);