Commit 86651650 authored by Elad Kanfi's avatar Elad Kanfi Committed by David S. Miller

net: nps_enet: Disable interrupts before napi reschedule

Since NAPI works by shutting down event interrupts when theres
work and turning them on when theres none, the net driver must
make sure that interrupts are disabled when it reschedules polling.
By calling napi_reschedule, the driver switches to polling mode,
therefor there should be no interrupt interference.
Any received packets will be handled in nps_enet_poll by polling the HW
indication of received packet until all packets are handled.
Signed-off-by: default avatarElad Kanfi <eladkan@mellanox.com>
Acked-by: default avatarNoam Camus <noamca@mellanox.com>
Tested-by: default avatarAlexey Brodkin <abrodkin@synopsys.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0d08df6c
......@@ -205,9 +205,11 @@ static int nps_enet_poll(struct napi_struct *napi, int budget)
* re-adding ourselves to the poll list.
*/
if (priv->tx_skb && !tx_ctrl_ct)
if (priv->tx_skb && !tx_ctrl_ct) {
nps_enet_reg_set(priv, NPS_ENET_REG_BUF_INT_ENABLE, 0);
napi_reschedule(napi);
}
}
return work_done;
}
......
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