On Wed, 11 Nov 2015 12:13:59 +0100, Maarten Brock wrote: > > We want the edge. > > I don't think you do. It's exactly this that breaks shared interrupts. Consider > the following scenario. There are two SC16IS7xx's sharing their interrupt. > Assume A to be handled first and B second. A character arrives at B which makes > the /IRQ_B go low. The handler for A is run and it finds no flags in IIR so it > ends. Then the handler for B is run and the character is retrieved. But in the > meantime A also receives a character and makes /IRQ_A low. The /IRQ input of the > interrupt controller never sees a second falling edge. When the handler for B is > done, /IRQ_B will go inactive but the line stays low since /IRQ_A is still > active. There is however nothing retriggering the handler of A. Right, I see your point now. The danger of using level-triggered IRQs in general is obviously that if the line goes low permanently (HW failure, chip multfunction) the entire system will die in IRQ storm. > So how could a level interrupt help here? When /IRQ_B goes low first handler A > and then handler B are executed as before. Due to the ONESHOT setting the > interrupt is disabled in the interrupt controller until all threaded handlers > have reenabled the interrupt. If at this point A still has an unhandled > interrupt request the line is still low and the interrupt triggered. This leads > to both handlers to be called again and the character in A retrieved. Yup. Small note - as I already said - ONESHOT seems to be only used by IRQ core if we use devm_request_threaded_irq(), we should remove this flag as it only confuses people. -- 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