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

[PATCH] skge: get rid of warning on race

Get rid of warning in case of race with ring full and lockless
tx on the skge driver. It is possible to be in the transmit
routine with no available slots and already stopped.
Signed-off-by: default avatarStephen Hemminger <shemminger@osdl.org>
Signed-off-by: default avatarJeff Garzik <jgarzik@pobox.com>
parent 0e670506
...@@ -2280,11 +2280,13 @@ static int skge_xmit_frame(struct sk_buff *skb, struct net_device *dev) ...@@ -2280,11 +2280,13 @@ static int skge_xmit_frame(struct sk_buff *skb, struct net_device *dev)
} }
if (unlikely(skge->tx_avail < skb_shinfo(skb)->nr_frags +1)) { if (unlikely(skge->tx_avail < skb_shinfo(skb)->nr_frags +1)) {
netif_stop_queue(dev); if (!netif_stopped(dev)) {
spin_unlock_irqrestore(&skge->tx_lock, flags); netif_stop_queue(dev);
printk(KERN_WARNING PFX "%s: ring full when queue awake!\n", printk(KERN_WARNING PFX "%s: ring full when queue awake!\n",
dev->name); dev->name);
}
spin_unlock_irqrestore(&skge->tx_lock, flags);
return NETDEV_TX_BUSY; return NETDEV_TX_BUSY;
} }
......
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