diff options
author | florian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2012-08-08 21:51:13 +0000 |
---|---|---|
committer | florian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2012-08-08 21:51:13 +0000 |
commit | 1536e9883640a2824d81a78a842fe2c37e8e53bb (patch) | |
tree | b68cdbcb3cc6fa0d4e1bce5843e99245fb562628 /target/linux | |
parent | fe5c16eebf2b4becc6090c017829faa1ec37ba8e (diff) |
[mcs814x] nuport-mac: close possible race condition during start
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@33069 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux')
-rw-r--r-- | target/linux/mcs814x/files-3.3/drivers/net/ethernet/mcs8140/nuport_mac.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/target/linux/mcs814x/files-3.3/drivers/net/ethernet/mcs8140/nuport_mac.c b/target/linux/mcs814x/files-3.3/drivers/net/ethernet/mcs8140/nuport_mac.c index ebf95a6533..8cd3d0e6b6 100644 --- a/target/linux/mcs814x/files-3.3/drivers/net/ethernet/mcs8140/nuport_mac.c +++ b/target/linux/mcs814x/files-3.3/drivers/net/ethernet/mcs8140/nuport_mac.c @@ -809,7 +809,11 @@ static int nuport_mac_open(struct net_device *dev) nuport_mac_reset_rx_dma(priv); /* Start RX DMA */ - return nuport_mac_start_rx_dma(priv, priv->rx_skb[0]); + spin_lock_irqsave(&priv->lock, flags); + ret = nuport_mac_start_rx_dma(priv, priv->rx_skb[0]); + spin_unlock_irqrestore(&priv->lock, flags); + + return ret; out_rx_skb: nuport_mac_free_rx_ring(priv); |