]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/3.19.2/serial-8250-revert-tty-serial-8250_core-read-only-rx-if-there-is-something-in-the-fifo.patch
4.14-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.19.2 / serial-8250-revert-tty-serial-8250_core-read-only-rx-if-there-is-something-in-the-fifo.patch
CommitLineData
ba74a726
GKH
1From ca8bb4aefb932e3da105f28cbfba36d57a931081 Mon Sep 17 00:00:00 2001
2From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
3Date: Sun, 15 Feb 2015 18:32:16 +0100
4Subject: serial: 8250: Revert "tty: serial: 8250_core: read only RX if there is something in the FIFO"
5
6From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
7
8commit ca8bb4aefb932e3da105f28cbfba36d57a931081 upstream.
9
10This reverts commit 0aa525d11859c1a4d5b78fdc704148e2ae03ae13.
11
12The conditional RX-FIFO read seems to cause spurious interrupts and we
13see just:
14|serial8250: too much work for irq29
15
16The previous behaviour was "default" for decades and Marvell's 88f6282 SoC
17might not be the only that relies on it. Therefore the Omap fix is
18reverted for now.
19
20Fixes: 0aa525d11859 ("tty: serial: 8250_core: read only RX if there is
21something in the FIFO")
22Reported-By: Nicolas Schichan <nschichan@freebox.fr>
23Debuged-By: Peter Hurley <peter@hurleysoftware.com>
24Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
25Signed-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);