Commit 05bbe558 authored by Heiner Kallweit's avatar Heiner Kallweit Committed by David S. Miller

r8169: simplify interrupt handler

Simplify the interrupt handler a little and make it better readable.
Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 098b01ad
...@@ -6520,20 +6520,15 @@ static int rtl_rx(struct net_device *dev, struct rtl8169_private *tp, u32 budget ...@@ -6520,20 +6520,15 @@ static int rtl_rx(struct net_device *dev, struct rtl8169_private *tp, u32 budget
static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance) static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance)
{ {
struct rtl8169_private *tp = dev_instance; struct rtl8169_private *tp = dev_instance;
int handled = 0; u16 status = rtl_get_events(tp);
u16 status;
status = rtl_get_events(tp); if (status == 0xffff || !(status & (RTL_EVENT_NAPI | tp->event_slow)))
if (status && status != 0xffff) { return IRQ_NONE;
status &= RTL_EVENT_NAPI | tp->event_slow;
if (status) {
handled = 1;
rtl_irq_disable(tp); rtl_irq_disable(tp);
napi_schedule_irqoff(&tp->napi); napi_schedule_irqoff(&tp->napi);
}
} return IRQ_HANDLED;
return IRQ_RETVAL(handled);
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment