From: Eugene Teo <eteo@redhat.com> Date: Tue, 22 Jul 2008 18:12:02 +0800 Subject: [misc] irq: reset stats when installing new handler Message-id: 20080722101202.GA19155@kernel.sg O-Subject: [RHEL5.3 PATCH] kernel: serial open/close loop disables irq Bugzilla: 456218 RH-Acked-by: Prarit Bhargava <prarit@redhat.com> RH-Acked-by: Brian Maly <bmaly@redhat.com> This is for bz#456218. Backport of upstream commit 8528b0f1de1101c6002036fd53638fb21111d0ea Any newly added irq handler may obviously make any old spurious irq status invalid, since the new handler may well be the thing that is supposed to handle any interrupts that came in. So just clear the statistics when adding handlers. Signed-off-by: Eugene Teo <eteo@redhat.com> diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index c2f92f1..2df2d67 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c @@ -312,6 +312,9 @@ int setup_irq(unsigned int irq, struct irqaction *new) /* Undo nested disables: */ desc->depth = 1; } + /* Reset broken irq detection when installing new handler */ + desc->irq_count = 0; + desc->irqs_unhandled = 0; spin_unlock_irqrestore(&desc->lock, flags); new->irq = irq;