Skip to content

Commit 7274c41

Browse files
hkallweitkuba-moo
authored andcommitted
r8169: don't try to disable interrupts if NAPI is scheduled already
There's no benefit in trying to disable interrupts if NAPI is scheduled already. This allows us to save a PCI write in this case. Signed-off-by: Heiner Kallweit <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 21c8597 commit 7274c41

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/net/ethernet/realtek/r8169_main.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4549,8 +4549,10 @@ static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance)
45494549
rtl_schedule_task(tp, RTL_FLAG_TASK_RESET_PENDING);
45504550
}
45514551

4552-
rtl_irq_disable(tp);
4553-
napi_schedule(&tp->napi);
4552+
if (napi_schedule_prep(&tp->napi)) {
4553+
rtl_irq_disable(tp);
4554+
__napi_schedule(&tp->napi);
4555+
}
45544556
out:
45554557
rtl_ack_events(tp, status);
45564558

0 commit comments

Comments
 (0)