mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-28 01:28:59 +00:00
9e5d743422
All patches automatically rebased. Build system: x86_64 Build-tested: ipq806x/R7800 Signed-off-by: John Audia <therealgraysky@proton.me>
40 lines
1.2 KiB
Diff
40 lines
1.2 KiB
Diff
From 16769a8923fad5a5377253bcd76b0e0d64976c73 Mon Sep 17 00:00:00 2001
|
|
From: Felix Fietkau <nbd@nbd.name>
|
|
Date: Thu, 22 Apr 2021 22:21:05 -0700
|
|
Subject: [PATCH] net: ethernet: mtk_eth_soc: reduce unnecessary interrupts
|
|
|
|
Avoid rearming interrupt if napi_complete returns false
|
|
|
|
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
|
|
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
---
|
|
drivers/net/ethernet/mediatek/mtk_eth_soc.c | 9 +++++----
|
|
1 file changed, 5 insertions(+), 4 deletions(-)
|
|
|
|
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
|
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
|
@@ -1554,8 +1554,8 @@ static int mtk_napi_tx(struct napi_struc
|
|
if (status & MTK_TX_DONE_INT)
|
|
return budget;
|
|
|
|
- napi_complete(napi);
|
|
- mtk_tx_irq_enable(eth, MTK_TX_DONE_INT);
|
|
+ if (napi_complete(napi))
|
|
+ mtk_tx_irq_enable(eth, MTK_TX_DONE_INT);
|
|
|
|
return tx_done;
|
|
}
|
|
@@ -1588,8 +1588,9 @@ poll_again:
|
|
remain_budget -= rx_done;
|
|
goto poll_again;
|
|
}
|
|
- napi_complete(napi);
|
|
- mtk_rx_irq_enable(eth, MTK_RX_DONE_INT);
|
|
+
|
|
+ if (napi_complete(napi))
|
|
+ mtk_rx_irq_enable(eth, MTK_RX_DONE_INT);
|
|
|
|
return rx_done + budget - remain_budget;
|
|
}
|