@@ -3552,6 +3552,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.
@@ -3560,6 +3561,14 @@ 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.
*/
@@ -3609,6 +3618,9 @@ static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance)
RTL_W16(IntrStatus,
(status & RxFIFOOver) ? (status | RxOverflow) : status);
status = RTL_R16(IntrStatus);
+ if (status == 0xffff)
+ break;
+ status &= tp->intr_mask;
}
return IRQ_RETVAL(handled);