r8169: improve spurious interrupt detection

Improve detection of spurious interrupts by checking against the
interrupt mask as currently set in the chip.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Heiner Kallweit 2018-12-15 16:25:05 +01:00 committed by David S. Miller
parent b09026c691
commit e782410ed2
1 changed files with 2 additions and 1 deletions

View File

@ -6405,8 +6405,9 @@ static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance)
{
struct rtl8169_private *tp = dev_instance;
u16 status = rtl_get_events(tp);
u16 irq_mask = RTL_R16(tp, IntrMask);
if (status == 0xffff || !(status & tp->irq_mask))
if (status == 0xffff || !(status & irq_mask))
return IRQ_NONE;
if (unlikely(status & SYSErr)) {