[PATCH 3.13.y-ckt 008/143] bnx2x: fix napi poll return value for repoll

Kamal Mostafa kamal at canonical.com
Tue Mar 31 19:46:13 UTC 2015

3.13.11-ckt18 -stable review patch.  If anyone has any objections, please let me know.


From: Govindarajulu Varadarajan <_govind at gmx.com>

[ Upstream commit 24e579c8898aa641ede3149234906982290934e5 ]

With the commit d75b1ade567ffab ("net: less interrupt masking in NAPI") napi
repoll is done only when work_done == budget. When in busy_poll is we return 0
in napi_poll. We should return budget.

Signed-off-by: Govindarajulu Varadarajan <_govind at gmx.com>
Acked-by: Eric Dumazet <edumazet at google.com>
Signed-off-by: David S. Miller <davem at davemloft.net>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
index a9324f4..280cb5c 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
@@ -3100,7 +3100,7 @@ int bnx2x_poll(struct napi_struct *napi, int budget)
 		if (!bnx2x_fp_lock_napi(fp))
-			return work_done;
+			return budget;
 		for_each_cos_in_tx_queue(fp, cos)
 			if (bnx2x_tx_queue_has_work(fp->txdata_ptr[cos]))

More information about the kernel-team mailing list