Re: [PATCH v2 5/7] serial: 8250_dw: Rework IIR_NO_INT handling to stop interrupt storm

From: Andy Shevchenko

Date: Wed Jan 28 2026 - 09:09:35 EST


On Wed, Jan 28, 2026 at 12:52:59PM +0200, Ilpo Järvinen wrote:
> INTC10EE UART can end up into an interrupt storm where it reports
> IIR_NO_INT (0x1). If the storm happens during active UART operation, it
> is promptly stopped by IIR value change due to Rx or Tx events.
> However, when there is no activity, either due to idle serial line or
> due to specific circumstances such as during shutdown that writes
> IER=0, there is nothing to stop the storm.
>
> During shutdown the storm is particularly problematic because
> serial8250_do_shutdown() calls synchronize_irq() that will hang in
> waiting for the storm to finish which never happens.
>
> This problem can also result in triggering a warning:
>
> irq 45: nobody cared (try booting with the "irqpoll" option)
> [...snip...]
> handlers:
> serial8250_interrupt
> Disabling IRQ #45
>
> Normal means to reset interrupt status by reading LSR, MSR, USR, or RX
> register do not result in the UART deasserting the IRQ.
>
> Add a quirk to INTC10EE UARTs to enable Tx interrupts if UART's Tx is
> currently empty and inactive. Rework IIR_NO_INT to keep track of the
> number of consecutive IIR_NO_INT, and on fourth one perform the quirk.
> Enabling Tx interrupts should change IIR value from IIR_NO_INT to
> IIR_THRI which has been observed to stop the storm.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>

...

> +/*
> + * Number of consecutive IIR_NO_INT interrupts required to trigger interrupt
> + * storm prevention code.
> + */
> +#define DW_UART_QUIRK_IER_KICK_THRES 4

Actually if we...

> struct dw8250_platform_data {

> u8 usr_reg;

> unsigned int skip_autocfg:1;
> unsigned int uart_16550_compatible:1;
> +
> + u8 no_int_count;

...define this as

unsigned int no_int_count:2;

there will be no need to have a modulo at all. But I agree it might look a bit
weird.

> };

--
With Best Regards,
Andy Shevchenko