Commit e3a1b99f authored by Stephen Hemminger's avatar Stephen Hemminger Committed by Jeff Garzik

skge: deadlock on tx timeout

The skge driver will deadlock if gets a transmit timeout
because the netif_tx_lock() is already held.
Signed-off-by: default avatarStephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent 12998096
...@@ -2576,7 +2576,11 @@ static int skge_down(struct net_device *dev) ...@@ -2576,7 +2576,11 @@ static int skge_down(struct net_device *dev)
skge_led(skge, LED_MODE_OFF); skge_led(skge, LED_MODE_OFF);
netif_poll_disable(dev); netif_poll_disable(dev);
netif_tx_lock_bh(dev);
skge_tx_clean(dev); skge_tx_clean(dev);
netif_tx_unlock_bh(dev);
skge_rx_clean(skge); skge_rx_clean(skge);
kfree(skge->rx_ring.start); kfree(skge->rx_ring.start);
...@@ -2721,7 +2725,6 @@ static void skge_tx_clean(struct net_device *dev) ...@@ -2721,7 +2725,6 @@ static void skge_tx_clean(struct net_device *dev)
struct skge_port *skge = netdev_priv(dev); struct skge_port *skge = netdev_priv(dev);
struct skge_element *e; struct skge_element *e;
netif_tx_lock_bh(dev);
for (e = skge->tx_ring.to_clean; e != skge->tx_ring.to_use; e = e->next) { for (e = skge->tx_ring.to_clean; e != skge->tx_ring.to_use; e = e->next) {
struct skge_tx_desc *td = e->desc; struct skge_tx_desc *td = e->desc;
skge_tx_free(skge, e, td->control); skge_tx_free(skge, e, td->control);
...@@ -2730,7 +2733,6 @@ static void skge_tx_clean(struct net_device *dev) ...@@ -2730,7 +2733,6 @@ static void skge_tx_clean(struct net_device *dev)
skge->tx_ring.to_clean = e; skge->tx_ring.to_clean = e;
netif_wake_queue(dev); netif_wake_queue(dev);
netif_tx_unlock_bh(dev);
} }
static void skge_tx_timeout(struct net_device *dev) static void skge_tx_timeout(struct net_device *dev)
......
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