Commit 93feca3d157ad5bbf14ca2a357b3ec992251ce1b
Committed by
Greg Kroah-Hartman
1 parent
7aa58c2255
Exists in
smarc-ti-linux-3.14.y
and in
1 other branch
netxen: fix netxen_nic_poll() logic
[ Upstream commit 6088beef3f7517717bd21d90b379714dd0837079 ] NAPI poll logic now enforces that a poller returns exactly the budget when it wants to be called again. If a driver limits TX completion, it has to return budget as well when the limit is hit, not the number of received packets. Reported-and-tested-by: Mike Galbraith <umgwanakikbuti@gmail.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Fixes: d75b1ade567f ("net: less interrupt masking in NAPI") Cc: Manish Chopra <manish.chopra@qlogic.com> Acked-by: Manish Chopra <manish.chopra@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Showing 1 changed file with 4 additions and 1 deletions Side-by-side Diff
drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c
... | ... | @@ -2390,7 +2390,10 @@ |
2390 | 2390 | |
2391 | 2391 | work_done = netxen_process_rcv_ring(sds_ring, budget); |
2392 | 2392 | |
2393 | - if ((work_done < budget) && tx_complete) { | |
2393 | + if (!tx_complete) | |
2394 | + work_done = budget; | |
2395 | + | |
2396 | + if (work_done < budget) { | |
2394 | 2397 | napi_complete(&sds_ring->napi); |
2395 | 2398 | if (test_bit(__NX_DEV_UP, &adapter->state)) |
2396 | 2399 | netxen_nic_enable_int(sds_ring); |