aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElad Kanfi <eladkan@mellanox.com>2016-05-26 08:00:06 -0400
committerDavid S. Miller <davem@davemloft.net>2016-05-30 01:35:21 -0400
commit86651650d16a359e4142c6a8b0467c87e48c4c94 (patch)
tree89ca0b8ab48cf302fd383c73aeb5b8ed06c8036e
parent0d08df6c493898e679d9c517e77ea95c063d40ec (diff)
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: Elad Kanfi <eladkan@mellanox.com> Acked-by: Noam Camus <noamca@mellanox.com> Tested-by: Alexey Brodkin <abrodkin@synopsys.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/ezchip/nps_enet.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/ezchip/nps_enet.c b/drivers/net/ethernet/ezchip/nps_enet.c
index 085f9125cf42..06f031715b57 100644
--- a/drivers/net/ethernet/ezchip/nps_enet.c
+++ b/drivers/net/ethernet/ezchip/nps_enet.c
@@ -205,8 +205,10 @@ static int nps_enet_poll(struct napi_struct *napi, int budget)
205 * re-adding ourselves to the poll list. 205 * re-adding ourselves to the poll list.
206 */ 206 */
207 207
208 if (priv->tx_skb && !tx_ctrl_ct) 208 if (priv->tx_skb && !tx_ctrl_ct) {
209 nps_enet_reg_set(priv, NPS_ENET_REG_BUF_INT_ENABLE, 0);
209 napi_reschedule(napi); 210 napi_reschedule(napi);
211 }
210 } 212 }
211 213
212 return work_done; 214 return work_done;