summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSergey Organov <sorganov@gmail.com>2023-02-01 15:26:57 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-02-08 13:11:58 +0100
commitfbf971701d03ede858f5ca8b8b8e328671ab04f4 (patch)
tree278a060c15d63d68ac38c46e87991394b2ec7a54 /drivers
parentserial: imx: do not sysrq broken chars (diff)
downloadlinux-fbf971701d03ede858f5ca8b8b8e328671ab04f4.tar.xz
linux-fbf971701d03ede858f5ca8b8b8e328671ab04f4.zip
serial: imx: do not break from FIFO reading loop prematurely
There is no reason to prematurely break out of FIFO reading loop, and it might cause needless reenters into ISR, so keep reading until FIFO is empty. Signed-off-by: Sergey Organov <sorganov@gmail.com> Link: https://lore.kernel.org/r/20230201142700.4346-5-sorganov@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/tty/serial/imx.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index bd5d426c28fb..ef0b9d353617 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -890,7 +890,7 @@ static void imx_uart_check_flood(struct imx_port *sport, u32 usr2)
static irqreturn_t __imx_uart_rxint(int irq, void *dev_id)
{
struct imx_port *sport = dev_id;
- unsigned int rx, flg, ignored = 0;
+ unsigned int rx, flg;
struct tty_port *port = &sport->port.state->port;
u32 usr2;
@@ -923,11 +923,8 @@ static irqreturn_t __imx_uart_rxint(int irq, void *dev_id)
if (rx & URXD_OVRRUN)
sport->port.icount.overrun++;
- if (rx & sport->port.ignore_status_mask) {
- if (++ignored > 100)
- goto out;
+ if (rx & sport->port.ignore_status_mask)
continue;
- }
rx &= (sport->port.read_status_mask | 0xFF);
@@ -946,13 +943,12 @@ static irqreturn_t __imx_uart_rxint(int irq, void *dev_id)
}
if (sport->port.ignore_status_mask & URXD_DUMMY_READ)
- goto out;
+ continue;
if (tty_insert_flip_char(port, rx, flg) == 0)
sport->port.icount.buf_overrun++;
}
-out:
tty_flip_buffer_push(port);
return IRQ_HANDLED;