Commit 6088beef authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller

netxen: fix netxen_nic_poll() logic

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: default avatarMike Galbraith <>
Signed-off-by: default avatarEric Dumazet <>
Fixes: d75b1ade ("net: less interrupt masking in NAPI")
Cc: Manish Chopra <>
Acked-by: default avatarManish Chopra <>
Signed-off-by: default avatarDavid S. Miller <>
parent f104fedc
...@@ -2388,7 +2388,10 @@ static int netxen_nic_poll(struct napi_struct *napi, int budget) ...@@ -2388,7 +2388,10 @@ static int netxen_nic_poll(struct napi_struct *napi, int budget)
work_done = netxen_process_rcv_ring(sds_ring, budget); work_done = netxen_process_rcv_ring(sds_ring, budget);
if ((work_done < budget) && tx_complete) { if (!tx_complete)
work_done = budget;
if (work_done < budget) {
napi_complete(&sds_ring->napi); napi_complete(&sds_ring->napi);
if (test_bit(__NX_DEV_UP, &adapter->state)) if (test_bit(__NX_DEV_UP, &adapter->state))
netxen_nic_enable_int(sds_ring); netxen_nic_enable_int(sds_ring);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment