]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
tty: serial: imx: clear Ageing Timer Interrupt in handler
authorMatthias Schiffer <matthias.schiffer@ew.tq-group.com>
Thu, 28 May 2020 15:47:47 +0000 (17:47 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 May 2020 11:00:54 +0000 (13:00 +0200)
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>
drivers/tty/serial/imx.c

index 6b078e395931f04749005ca38eb89e1b38232e2f..1265e8d86d8abbf4d1f5441aa2e8c123aabb1894 100644 (file)
@@ -909,6 +909,8 @@ static irqreturn_t imx_uart_int(int irq, void *dev_id)
                usr2 &= ~USR2_ORE;
 
        if (usr1 & (USR1_RRDY | USR1_AGTIM)) {
+               imx_uart_writel(sport, USR1_AGTIM, USR1);
+
                __imx_uart_rxint(irq, dev_id);
                ret = IRQ_HANDLED;
        }