From 52dbe8465e5b85263a4c28a48bc902e8c50b2f1b Mon Sep 17 00:00:00 2001 From: Heiner Kallweit Date: Wed, 19 Aug 2020 13:02:01 +0200 Subject: [PATCH] r8169: use napi_complete_done return value Consider the return value of napi_complete_done(), this allows users to use the gro_flush_timeout sysfs attribute as an alternative to classic interrupt coalescing. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller --- drivers/net/ethernet/realtek/r8169_main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c index d1da92a..dbc324c 100644 --- a/drivers/net/ethernet/realtek/r8169_main.c +++ b/drivers/net/ethernet/realtek/r8169_main.c @@ -4596,10 +4596,8 @@ static int rtl8169_poll(struct napi_struct *napi, int budget) rtl_tx(dev, tp, budget); - if (work_done < budget) { - napi_complete_done(napi, work_done); + if (work_done < budget && napi_complete_done(napi, work_done)) rtl_irq_enable(tp); - } return work_done; } -- 2.7.4