summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/realtek
diff options
context:
space:
mode:
authorHeiner Kallweit <hkallweit1@gmail.com>2018-08-10 22:38:29 +0200
committerDavid S. Miller <davem@davemloft.net>2018-08-10 14:32:35 -0700
commit05bbe5584ff9dc218f20398755de29f02dbc6093 (patch)
treecc3deabc3ea4e52f097f8c2bf01f1eb71b69e677 /drivers/net/ethernet/realtek
parent098b01ad9837b4d4d0022f407300f069a999e55a (diff)
downloadtalos-obmc-linux-05bbe5584ff9dc218f20398755de29f02dbc6093.tar.gz
talos-obmc-linux-05bbe5584ff9dc218f20398755de29f02dbc6093.zip
r8169: simplify interrupt handler
Simplify the interrupt handler a little and make it better readable. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/realtek')
-rw-r--r--drivers/net/ethernet/realtek/r8169.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index 7f0975b61c53..fc6ae446816d 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -6520,20 +6520,15 @@ release_descriptor:
static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance)
{
struct rtl8169_private *tp = dev_instance;
- int handled = 0;
- u16 status;
+ u16 status = rtl_get_events(tp);
- status = rtl_get_events(tp);
- if (status && status != 0xffff) {
- status &= RTL_EVENT_NAPI | tp->event_slow;
- if (status) {
- handled = 1;
+ if (status == 0xffff || !(status & (RTL_EVENT_NAPI | tp->event_slow)))
+ return IRQ_NONE;
- rtl_irq_disable(tp);
- napi_schedule_irqoff(&tp->napi);
- }
- }
- return IRQ_RETVAL(handled);
+ rtl_irq_disable(tp);
+ napi_schedule_irqoff(&tp->napi);
+
+ return IRQ_HANDLED;
}
/*
OpenPOWER on IntegriCloud