]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob
21c53c54ce195cadab9ae05d5d4e3ad713cd1439
[thirdparty/kernel/stable-queue.git] /
1 From ca8bb4aefb932e3da105f28cbfba36d57a931081 Mon Sep 17 00:00:00 2001
2 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
3 Date: Sun, 15 Feb 2015 18:32:16 +0100
4 Subject: serial: 8250: Revert "tty: serial: 8250_core: read only RX if there is something in the FIFO"
5
6 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
7
8 commit ca8bb4aefb932e3da105f28cbfba36d57a931081 upstream.
9
10 This reverts commit 0aa525d11859c1a4d5b78fdc704148e2ae03ae13.
11
12 The conditional RX-FIFO read seems to cause spurious interrupts and we
13 see just:
14 |serial8250: too much work for irq29
15
16 The previous behaviour was "default" for decades and Marvell's 88f6282 SoC
17 might not be the only that relies on it. Therefore the Omap fix is
18 reverted for now.
19
20 Fixes: 0aa525d11859 ("tty: serial: 8250_core: read only RX if there is
21 something in the FIFO")
22 Reported-By: Nicolas Schichan <nschichan@freebox.fr>
23 Debuged-By: Peter Hurley <peter@hurleysoftware.com>
24 Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
25 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
26
27 ---
28 drivers/tty/serial/8250/8250_core.c | 11 +++++------
29 1 file changed, 5 insertions(+), 6 deletions(-)
30
31 --- a/drivers/tty/serial/8250/8250_core.c
32 +++ b/drivers/tty/serial/8250/8250_core.c
33 @@ -2107,8 +2107,8 @@ int serial8250_do_startup(struct uart_po
34 /*
35 * Clear the interrupt registers.
36 */
37 - if (serial_port_in(port, UART_LSR) & UART_LSR_DR)
38 - serial_port_in(port, UART_RX);
39 + serial_port_in(port, UART_LSR);
40 + serial_port_in(port, UART_RX);
41 serial_port_in(port, UART_IIR);
42 serial_port_in(port, UART_MSR);
43
44 @@ -2269,8 +2269,8 @@ dont_test_tx_en:
45 * saved flags to avoid getting false values from polling
46 * routines or the previous session.
47 */
48 - if (serial_port_in(port, UART_LSR) & UART_LSR_DR)
49 - serial_port_in(port, UART_RX);
50 + serial_port_in(port, UART_LSR);
51 + serial_port_in(port, UART_RX);
52 serial_port_in(port, UART_IIR);
53 serial_port_in(port, UART_MSR);
54 up->lsr_saved_flags = 0;
55 @@ -2363,8 +2363,7 @@ void serial8250_do_shutdown(struct uart_
56 * Read data port to reset things, and then unlink from
57 * the IRQ chain.
58 */
59 - if (serial_port_in(port, UART_LSR) & UART_LSR_DR)
60 - serial_port_in(port, UART_RX);
61 + serial_port_in(port, UART_RX);
62 serial8250_rpm_put(up);
63
64 del_timer_sync(&up->timer);