Skip to contentSkip to conversation

r8169: change irq handler to always trigger NAPI polling

PATCH Applied Heiner Kallweit 2 participants 2 messages Apr 14, 2019

Subsystems (3)
lore
Share & tools
lore

Heiner Kallweit

author maintainer
#0 lore raw

PATCH 1/1 r8169: change irq handler to always trigger NAPI polling

This check isn't really needed and we can simplify the code and save some CPU cycles by removing it. Only in case of an error none of these bits are set, and calling the NAPI callback doesn't hurt in this case.

---
 drivers/net/ethernet/realtek/r8169.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/net/ethernet/realtek/r8169.c +2 -4
index 68caa26f0..efaea1a0a 100644
@@ -6380,10 +6380,8 @@ static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance)
 		set_bit(RTL_FLAG_TASK_RESET_PENDING, tp->wk.flags);
 	}
 
-	if (status & (RTL_EVENT_NAPI | LinkChg)) {
-		rtl_irq_disable(tp);
-		napi_schedule_irqoff(&tp->napi);
-	}
+	rtl_irq_disable(tp);
+	napi_schedule_irqoff(&tp->napi);
 out:
 	rtl_ack_events(tp, status);
 
Signature · 1 line
2.21.0
maintainer Applied
#1 lore raw

From: Heiner Kallweit <[email protected]>
Date: Sun, 14 Apr 2019 11:48:39 +0200

Quoted 5 lines

This check isn't really needed and we can simplify the code and save some CPU cycles by removing it. Only in case of an error none of these bits are set, and calling the NAPI callback doesn't hurt in this case.

Applied.