Skip to content

Commit

Permalink
r8169: improve spurious interrupt detection
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Heiner Kallweit authored and David S. Miller committed Dec 15, 2018
1 parent b09026c commit e782410
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/ethernet/realtek/r8169.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit e782410

Please sign in to comment.