[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200912193629.1586-4-hauke@hauke-m.de>
Date: Sat, 12 Sep 2020 21:36:28 +0200
From: Hauke Mehrtens <hauke@...ke-m.de>
To: davem@...emloft.net
Cc: kuba@...nel.org, netdev@...r.kernel.org,
martin.blumenstingl@...glemail.com, eric.dumazet@...il.com,
Hauke Mehrtens <hauke@...ke-m.de>
Subject: [PATCH v2 3/4] net: lantiq: Use napi_complete_done()
Use napi_complete_done() and activate the interrupts when this function
returns true. This way the generic NAPI code can take care of activating
the interrupts.
Signed-off-by: Hauke Mehrtens <hauke@...ke-m.de>
---
drivers/net/ethernet/lantiq_xrx200.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/lantiq_xrx200.c b/drivers/net/ethernet/lantiq_xrx200.c
index f34e4dc8c661..abee7d61074c 100644
--- a/drivers/net/ethernet/lantiq_xrx200.c
+++ b/drivers/net/ethernet/lantiq_xrx200.c
@@ -230,8 +230,8 @@ static int xrx200_poll_rx(struct napi_struct *napi, int budget)
}
if (rx < budget) {
- napi_complete(&ch->napi);
- ltq_dma_enable_irq(&ch->dma);
+ if (napi_complete_done(&ch->napi, rx))
+ ltq_dma_enable_irq(&ch->dma);
}
return rx;
@@ -272,8 +272,8 @@ static int xrx200_tx_housekeeping(struct napi_struct *napi, int budget)
netif_wake_queue(net_dev);
if (pkts < budget) {
- napi_complete(&ch->napi);
- ltq_dma_enable_irq(&ch->dma);
+ if (napi_complete_done(&ch->napi, pkts))
+ ltq_dma_enable_irq(&ch->dma);
}
return pkts;
--
2.20.1
Powered by blists - more mailing lists