提交 8c463ef7 编写于 作者: S Stephen Hemminger 提交者: Jeff Garzik

[PATCH] sky2: quiet ring full message in case of race

Don't print ring full message if we lose race.
Signed-off-by: NStephen Hemminger <shemminger@osdl.org>
Signed-off-by: NJeff Garzik <jgarzik@pobox.com>
上级 8cc048e3
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册