aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy@goop.org>2006-06-26 00:03:40 -0700
committerDavid S. Miller <davem@davemloft.net>2006-06-26 00:03:40 -0700
commit8834807b43200b1658b49d3b779e74a4f77e4ffb (patch)
treee9f8f2312b9ee3d4f6ea388f3b33c65e1495868c
parentd83561a4d67863b4aa297e8f598823dd4dfe855e (diff)
[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 <jeremy@goop.org> Acked-by: Matt Mackall <mpm@selenic.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/core/netpoll.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index 9cb78183038..377d1e7257b 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 */