Skip to contentSkip to conversation

bgmac: fix requests for extra polling calls from NAPI

PATCH Applied Rafał Miłecki 4 participants 4 messages Apr 23, 2015 – Apr 24, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bgmac: fix requests for extra polling calls from NAPI

After d75b1ade567f ("net: less interrupt masking in NAPI") polling function has to return whole budget when it wants NAPI to call it again.

Cc Felix Fietkau <[email protected]>
Fixes eb64e2923a886 ("bgmac: leave interrupts disabled as long as there is work to do")
---
 drivers/net/ethernet/broadcom/bgmac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/broadcom/bgmac.c +1 -1
index de77d3a..21e3c38 100644
@@ -1260,7 +1260,7 @@ static int bgmac_poll(struct napi_struct *napi, int weight)
 
 	/* Poll again if more events arrived in the meantime */
 	if (bgmac_read(bgmac, BGMAC_INT_STATUS) & (BGMAC_IS_TX0 | BGMAC_IS_RX))
-		return handled;
+		return weight;
 
 	if (handled < weight) {
 		napi_complete(napi);
Signature · 1 line
1.8.4.5
maintainer Applied
#2 lore raw

From: Felix Fietkau <[email protected]>
Date: Thu, 23 Apr 2015 21:00:04 +0200

Quoted 8 lines · Rafał Miłecki
Quoted 6 lines

After d75b1ade567f ("net: less interrupt masking in NAPI") polling function has to return whole budget when it wants NAPI to call it again.

Cc Felix Fietkau <[email protected]>
Fixes eb64e2923a886 ("bgmac: leave interrupts disabled as long as there is work to do")

Applied, thanks everyone.

#3 lore raw
In reply to Rafał Miłecki
Quoted 9 lines · Rafał Miłecki

After d75b1ade567f ("net: less interrupt masking in NAPI") polling function has to return whole budget when it wants NAPI to call it again.

Cc Felix Fietkau <[email protected]>
Fixes eb64e2923a886 ("bgmac: leave interrupts disabled as long as there is work to do")
---
 drivers/net/ethernet/broadcom/bgmac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Thanks !