diff options
Diffstat (limited to 'net/core/netpoll.c')
-rw-r--r-- | net/core/netpoll.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/net/core/netpoll.c b/net/core/netpoll.c index 758dafe284c0..f8e74e511ce6 100644 --- a/net/core/netpoll.c +++ b/net/core/netpoll.c | |||
@@ -250,22 +250,23 @@ static void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb) | |||
250 | unsigned long flags; | 250 | unsigned long flags; |
251 | 251 | ||
252 | local_irq_save(flags); | 252 | local_irq_save(flags); |
253 | if (netif_tx_trylock(dev)) { | 253 | /* try until next clock tick */ |
254 | /* try until next clock tick */ | 254 | for (tries = jiffies_to_usecs(1)/USEC_PER_POLL; |
255 | for (tries = jiffies_to_usecs(1)/USEC_PER_POLL; | 255 | tries > 0; --tries) { |
256 | tries > 0; --tries) { | 256 | if (netif_tx_trylock(dev)) { |
257 | if (!netif_queue_stopped(dev)) | 257 | if (!netif_queue_stopped(dev)) |
258 | status = dev->hard_start_xmit(skb, dev); | 258 | status = dev->hard_start_xmit(skb, dev); |
259 | netif_tx_unlock(dev); | ||
259 | 260 | ||
260 | if (status == NETDEV_TX_OK) | 261 | if (status == NETDEV_TX_OK) |
261 | break; | 262 | break; |
262 | 263 | ||
263 | /* tickle device maybe there is some cleanup */ | ||
264 | netpoll_poll(np); | ||
265 | |||
266 | udelay(USEC_PER_POLL); | ||
267 | } | 264 | } |
268 | netif_tx_unlock(dev); | 265 | |
266 | /* tickle device maybe there is some cleanup */ | ||
267 | netpoll_poll(np); | ||
268 | |||
269 | udelay(USEC_PER_POLL); | ||
269 | } | 270 | } |
270 | local_irq_restore(flags); | 271 | local_irq_restore(flags); |
271 | } | 272 | } |