--- zzzz-none-000/linux-2.6.39.4/kernel/irq/spurious.c 2011-08-03 19:43:28.000000000 +0000 +++ puma6-atom-6490-729/linux-2.6.39.4/kernel/irq/spurious.c 2021-11-10 13:38:18.000000000 +0000 @@ -84,7 +84,24 @@ */ action = desc->action; if (!action || !(action->flags & IRQF_SHARED) || - (action->flags & __IRQF_TIMER) || !action->next) + /* PATCH http://markmail.org/message/uwkhr7hw6t7o5ls7 + * commit fa2727("genirq: Fixup poll handling") introduced + * a regression that broke irqfixup/irqpoll for some hardware + * configurations. That patch removed a test that checked for + * 'action->handler' returning IRQ_HANDLED, before acting on + * the IRQ. Putting this test back restores the functionality + * lost since 2.6.39. In the current set of tests after 'action' + * is set, it must precede '!action->next' to take effect. + * + * With this and the previous patch to spurious.c, c75d720fca8a, + * all IRQ regressions that I have encountered are fixed. + * + * Signed-off-by: Edward Donovan + */ + /*--- (action->flags & __IRQF_TIMER) || !action->next) ---*/ + (action->flags & __IRQF_TIMER) || + (action->handler(irq, action->dev_id) == IRQ_HANDLED) || + !action->next) goto out; /* Already running on another processor */