From 8834807b43200b1658b49d3b779e74a4f77e4ffb Mon Sep 17 00:00:00 2001 From: Jeremy Fitzhardinge Date: Mon, 26 Jun 2006 00:03:40 -0700 Subject: [NET] netpoll: don't spin forever sending to stopped queues When transmitting a skb in netpoll_send_skb(), only retry a limited number of times if the device queue is stopped. Signed-off-by: Jeremy Fitzhardinge Acked-by: Matt Mackall Signed-off-by: Andrew Morton Signed-off-by: David S. Miller --- net/core/netpoll.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'net') diff --git a/net/core/netpoll.c b/net/core/netpoll.c index 9cb781830380..377d1e7257b5 100644 --- a/net/core/netpoll.c +++ b/net/core/netpoll.c @@ -279,14 +279,10 @@ static void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb) * network drivers do not expect to be called if the queue is * stopped. */ - if (netif_queue_stopped(np->dev)) { - netif_tx_unlock(np->dev); - netpoll_poll(np); - udelay(50); - continue; - } + status = NETDEV_TX_BUSY; + if (!netif_queue_stopped(np->dev)) + status = np->dev->hard_start_xmit(skb, np->dev); - status = np->dev->hard_start_xmit(skb, np->dev); netif_tx_unlock(np->dev); /* success */ -- cgit v1.2.1