Re: [PATCH 1/2] sc16is7xx: Do not handle irqs in endless loop

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2016-08-08 15:32, dirk.eibach@xxxxxxxx wrote:
From: Dirk Eibach <dirk.eibach@xxxxxxxx>

sc16is7xx_port_irq() is laid out as an endless loop. It will exit only
when there is no more interrupt left to service. This not common
practice.
In our case it lead to some strange hangup situation when there was an
unexpected XOFF-interrupt that could not be handled.
So let's service interrupts only once and report XOFF-interrupts that
should never happen since they are never enabled.

The reason for such an endless loop in an interrupt handler usually means that multiple sources can generate an interrupt and the interrupt controller is configured for edge. During handling the interrupt of one source (e.g. data received) but before it is cleared, another interrupt can trigger (e.g. transmit done). This will not generate a new edge as the interrupt line is
still active! Thus re-reading the interrupt status is required. And with
interrupt sharing this problem gets even worse. The fact that the sc16is7xx
uses an indirect interface like i2c or spi doesn't help either.

When configured for level interrupts the interrupt will automatically
re-trigger. But the risk of interrupt storm when the hardware is broken
(interrupt line stuck active) seems to keep developers away from setting
level interrupt. IMHO an interrupt storm should be detectable by the
interrupt handler so nobody needs to fear using level sensitive interrupts.

Maarten

--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux