Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tty: serial: imx: clear Ageing Timer Interrupt in handler

The AGTIM flag must be cleared explicitly, otherwise the IRQ handler
will be called in an endless loop.

Fortunately, this issue currently doesn't affect mainline kernels in
practice, as the the RX FIFO trigger level is set to 1 in UFCR. When
setting the trigger level to a higher number, the issue is trivially
reproducible by any RX without DMA that doesn't fill the FIFO up to the
configured level.

Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
Link: https://lore.kernel.org/r/20200528154747.14201-1-matthias.schiffer@ew.tq-group.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Matthias Schiffer and committed by
Greg Kroah-Hartman
d1d996af 423d9118

+2
+2
drivers/tty/serial/imx.c
··· 909 909 usr2 &= ~USR2_ORE; 910 910 911 911 if (usr1 & (USR1_RRDY | USR1_AGTIM)) { 912 + imx_uart_writel(sport, USR1_AGTIM, USR1); 913 + 912 914 __imx_uart_rxint(irq, dev_id); 913 915 ret = IRQ_HANDLED; 914 916 }