diff options
author | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-11 21:35:17 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-11 21:35:17 -0500 |
commit | 4259cb25d436a79bf6b07d8075423573567c211d (patch) | |
tree | 05ae68a795315f4244036358df4c8e0f1034867d /net/core/netpoll.c | |
parent | cd39301a68f9604854f3543117b01dc73cbe193f (diff) | |
parent | a49f99ffca57a2eada23b1ac908a405c17859e35 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (32 commits)
[NETPOLL]: Fix local_bh_enable() warning.
[IPVS]: Make ip_vs_sync.c <= 80col wide.
[IPVS]: Use msleep_interruptable() instead of ssleep() aka msleep()
[HAMRADIO]: Fix baycom_epp.c compile failure.
[DCCP]: Whitespace cleanups
[DCCP] ccid3: Fixup some type conversions related to rtts
[DCCP] ccid3: BUG-FIX - conversion errors
[DCCP] ccid3: Reorder packet history source file
[DCCP] ccid3: Reorder packet history header file
[DCCP] ccid3: Make debug output consistent
[DCCP] ccid3: Perform history operations only after packet has been sent
[DCCP] ccid3: TX history - remove unused field
[DCCP] ccid3: Shift window counter computation
[DCCP] ccid3: Sanity-check RTT samples
[DCCP] ccid3: Initialise RTT values
[DCCP] ccid: Deprecate ccid_hc_tx_insert_options
[DCCP]: Warn when discarding packet due to internal errors
[DCCP]: Only deliver to the CCID rx side in charge
[DCCP]: Simplify TFRC calculation
[DCCP]: Debug timeval operations
...
Diffstat (limited to 'net/core/netpoll.c')
-rw-r--r-- | net/core/netpoll.c | 30 |
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) { |