aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/marvell
diff options
context:
space:
mode:
authorLino Sanfilippo <LinoSanfilippo@gmx.de>2014-11-30 05:49:36 -0500
committerDavid S. Miller <davem@davemloft.net>2014-12-06 00:33:19 -0500
commit8961b1940200ac5e91bee1c1bc69086365e1b7c9 (patch)
treee8d73b2709ca3fab49db6d00ee2eace768a4f407 /drivers/net/ethernet/marvell
parent769e0de6475e5512f88bfb4dbf6d6323fd23514f (diff)
pxa168: close race between napi and irq activation
In pxa168_eth_open() the irqs are enabled before napi. This opens a tiny time window in which the irq handler is processed, disables irqs but then is not able to schedule the not yet activated napi, leaving irqs disabled forever (since irqs are reenabled in napi poll function). Fix this race by activating napi before irqs are activated. Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/marvell')
-rw-r--r--drivers/net/ethernet/marvell/pxa168_eth.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/marvell/pxa168_eth.c b/drivers/net/ethernet/marvell/pxa168_eth.c
index c3b209cd0660..a3e394c47819 100644
--- a/drivers/net/ethernet/marvell/pxa168_eth.c
+++ b/drivers/net/ethernet/marvell/pxa168_eth.c
@@ -1153,8 +1153,8 @@ static int pxa168_eth_open(struct net_device *dev)
1153 pep->rx_used_desc_q = 0; 1153 pep->rx_used_desc_q = 0;
1154 pep->rx_curr_desc_q = 0; 1154 pep->rx_curr_desc_q = 0;
1155 netif_carrier_off(dev); 1155 netif_carrier_off(dev);
1156 eth_port_start(dev);
1157 napi_enable(&pep->napi); 1156 napi_enable(&pep->napi);
1157 eth_port_start(dev);
1158 return 0; 1158 return 0;
1159out_free_rx_skb: 1159out_free_rx_skb:
1160 rxq_deinit(dev); 1160 rxq_deinit(dev);