Re: [PATCH 2.6.30-rc4] r8169: avoid losing MSI interrupts
From: Eric W. Biederman <hidden>
Date: 2009-08-22 11:49:01
Also in:
lkml
David Dillow [off-list ref] writes:
Re-looking at the code, I'd guess that some IRQ status line is getting stuck high, but I don't see why -- we should acknowledge all outstanding interrupts each time through the loop, whether we care about them or not. Could reproduce a problem with the following patch applied, and send the full dmesg, please?
Here is what I get. r8169 screaming irq status 00000085 mask 0000ffff event 0000803f napi 0000001d Eric
quoted hunk
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index b82780d..46cb05a 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c@@ -3556,6 +3556,7 @@ static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance) void __iomem *ioaddr = tp->mmio_addr; int handled = 0; int status; + int count = 0; /* loop handling interrupts until we have no new ones or * we hit a invalid/hotplug case.@@ -3564,6 +3565,15 @@ static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance) while (status && status != 0xffff) { handled = 1; + if (count++ > 100) { + printk_once("r8169 screaming irq status %08x " + "mask %08x event %08x napi %08x\n", + status, tp->intr_mask, tp->intr_event, + tp->napi_event); + break; + } + + /* Handle all of the error cases first. These will reset * the chip, so just exit the loop. */