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 <hkallweit1@gmail.com>
Link: https://lore.kernel.org/r/78c7f2fb-9772-1015-8c1d-632cbdff253f@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Heiner Kallweit 2021-02-05 22:48:53 +01:00 коммит произвёл Jakub Kicinski
Родитель 21c85974aa
Коммит 7274c4147a
1 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

@ -4549,8 +4549,10 @@ static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance)
rtl_schedule_task(tp, RTL_FLAG_TASK_RESET_PENDING);
}
rtl_irq_disable(tp);
napi_schedule(&tp->napi);
if (napi_schedule_prep(&tp->napi)) {
rtl_irq_disable(tp);
__napi_schedule(&tp->napi);
}
out:
rtl_ack_events(tp, status);