Skip to content

Commit

Permalink
[PATCH] sky2: quiet ring full message in case of race
Browse files Browse the repository at this point in the history
Don't print ring full message if we lose race.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
  • Loading branch information
Stephen Hemminger authored and Jeff Garzik committed Dec 12, 2005
1 parent 8cc048e commit 8c463ef
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions drivers/net/sky2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1081,11 +1081,16 @@ static int sky2_xmit_frame(struct sk_buff *skb, struct net_device *dev)
return NETDEV_TX_LOCKED;

if (unlikely(tx_avail(sky2) < tx_le_req(skb))) {
netif_stop_queue(dev);
/* There is a known but harmless race with lockless tx
* and netif_stop_queue.
*/
if (!netif_queue_stopped(dev)) {
netif_stop_queue(dev);
printk(KERN_WARNING PFX "%s: ring full when queue awake!\n",
dev->name);
}
spin_unlock(&sky2->tx_lock);

printk(KERN_WARNING PFX "%s: ring full when queue awake!\n",
dev->name);
return NETDEV_TX_BUSY;
}

Expand Down

0 comments on commit 8c463ef

Please sign in to comment.