]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
serial: 8250: Don't service RX FIFO if interrupts are disabled
authorVignesh R <vigneshr@ti.com>
Thu, 8 Feb 2018 12:55:41 +0000 (18:25 +0530)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 14 Aug 2018 10:29:50 +0000 (12:29 +0200)
commiteb02c1b0f62bbf2a18c886ae6f90460705afc806
tree0833d7ecd17b4ab50da492852d00e65b62494b77
parentdb823e3204cd9dc7b5b817ef7f6cd9f9c59e7833
serial: 8250: Don't service RX FIFO if interrupts are disabled

BugLink: http://bugs.launchpad.net/bugs/1783418
[ Upstream commit 2e9fe539108320820016f78ca7704a7342788380 ]

Currently, data in RX FIFO is read based on UART_LSR register state even
if RDI and RLSI interrupts are disabled in UART_IER register.
This is because when IRQ handler is called due to TX FIFO empty event,
RX FIFO is serviced based on UART_LSR register status instead of
UART_IIR status. This defeats the purpose of disabling UART RX
FIFO interrupts during throttling(see, omap_8250_throttle()) as IRQ
handler continues to drain UART RX FIFO resulting in overflow of buffer
at tty layer.
Fix this by making sure that driver drains UART RX FIFO only when
UART_IIR_RDI is set along with UART_LSR_BI or UART_LSR_DR bits.

Signed-off-by: Vignesh R <vigneshr@ti.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/tty/serial/8250/8250_port.c