summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@osdl.org>2005-12-09 20:35:08 +0100
committerJeff Garzik <jgarzik@pobox.com>2005-12-12 21:27:21 +0100
commit8c463ef7928d7a42bb9ca410df9b294dc01c1850 (patch)
tree37615a7fc948094d2780aab66a354af0d4609d03 /drivers/net
parent[PATCH] sky2: handle tx timeout (diff)
downloadlinux-8c463ef7928d7a42bb9ca410df9b294dc01c1850.tar.xz
linux-8c463ef7928d7a42bb9ca410df9b294dc01c1850.zip
[PATCH] sky2: quiet ring full message in case of race
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>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/sky2.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index e1733aa17790..54947ae99482 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -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;
}