]> err.no Git - linux-2.6/commitdiff
[PATCH] sky2: quiet ring full message in case of race
authorStephen Hemminger <shemminger@osdl.org>
Fri, 9 Dec 2005 19:35:08 +0000 (11:35 -0800)
committerJeff Garzik <jgarzik@pobox.com>
Mon, 12 Dec 2005 20:27:21 +0000 (15:27 -0500)
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>
drivers/net/sky2.c

index e1733aa17790df510caccbe330d95adda29ba2f4..54947ae99482f921280cbc486e822e42581701b0 100644 (file)
@@ -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;
        }