aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/netpoll.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/core/netpoll.c')
-rw-r--r--net/core/netpoll.c30
1 files changed, 18 insertions, 12 deletions
diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index 8a271285f2f3..a01abdd2d3ea 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -242,22 +242,28 @@ static void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb)
242 242
243 /* don't get messages out of order, and no recursion */ 243 /* don't get messages out of order, and no recursion */
244 if (skb_queue_len(&npinfo->txq) == 0 && 244 if (skb_queue_len(&npinfo->txq) == 0 &&
245 npinfo->poll_owner != smp_processor_id() && 245 npinfo->poll_owner != smp_processor_id()) {
246 netif_tx_trylock(dev)) { 246 unsigned long flags;
247 /* try until next clock tick */
248 for (tries = jiffies_to_usecs(1)/USEC_PER_POLL; tries > 0; --tries) {
249 if (!netif_queue_stopped(dev))
250 status = dev->hard_start_xmit(skb, dev);
251 247
252 if (status == NETDEV_TX_OK) 248 local_irq_save(flags);
253 break; 249 if (netif_tx_trylock(dev)) {
250 /* try until next clock tick */
251 for (tries = jiffies_to_usecs(1)/USEC_PER_POLL;
252 tries > 0; --tries) {
253 if (!netif_queue_stopped(dev))
254 status = dev->hard_start_xmit(skb, dev);
254 255
255 /* tickle device maybe there is some cleanup */ 256 if (status == NETDEV_TX_OK)
256 netpoll_poll(np); 257 break;
257 258
258 udelay(USEC_PER_POLL); 259 /* tickle device maybe there is some cleanup */
260 netpoll_poll(np);
261
262 udelay(USEC_PER_POLL);
263 }
264 netif_tx_unlock(dev);
259 } 265 }
260 netif_tx_unlock(dev); 266 local_irq_restore(flags);
261 } 267 }
262 268
263 if (status != NETDEV_TX_OK) { 269 if (status != NETDEV_TX_OK) {