diff options
author | Colin Cross <ccross@android.com> | 2011-04-30 16:10:56 -0700 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:34:11 -0800 |
commit | 01c987cc4946a6d2747ffea44a1a1c942a20f988 (patch) | |
tree | f5a8f5b8da3146b7469470b7afe62b72a5a6520a /kernel/irq | |
parent | 4a76086ae344f5153b176efcb6453abfafac5869 (diff) |
irq: Always clear pending flag in check_irq_resend
If an interrupt occurs while the irq is masked, the irq is marked
as pending. For a level triggered interrupt, the pending flag
is only cleared when the interrupt is handled. If the interrupt
is never handled because the irq is deasserted before being
enabled it will stay pending, and suspend may be blocked by
check_wakeup_irqs.
Change check_irq_resend to always clear the pending flag,
including for level interrupts.
Signed-off-by: Colin Cross <ccross@android.com>
Diffstat (limited to 'kernel/irq')
-rw-r--r-- | kernel/irq/resend.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/kernel/irq/resend.c b/kernel/irq/resend.c index 14dd5761e8c9..ef60772d2feb 100644 --- a/kernel/irq/resend.c +++ b/kernel/irq/resend.c @@ -55,17 +55,18 @@ static DECLARE_TASKLET(resend_tasklet, resend_irqs, 0); */ void check_irq_resend(struct irq_desc *desc, unsigned int irq) { - /* - * We do not resend level type interrupts. Level type - * interrupts are resent by hardware when they are still - * active. - */ - if (irq_settings_is_level(desc)) - return; - if (desc->istate & IRQS_REPLAY) - return; if (desc->istate & IRQS_PENDING) { desc->istate &= ~IRQS_PENDING; + /* + * We do not resend level type interrupts. Level type + * interrupts are resent by hardware when they are still + * active. + */ + if (irq_settings_is_level(desc)) + return; + if (desc->istate & IRQS_REPLAY) + return; + desc->istate |= IRQS_REPLAY; if (!desc->irq_data.chip->irq_retrigger || |