diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-10-29 12:22:08 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-10-29 12:22:08 -0400 |
commit | 49b2de8e6febfea5a8791b6476195903af83a35d (patch) | |
tree | c93f328623b9429615981d4b7502997fdd0f72b0 /drivers/net/virtio_net.c | |
parent | 8633322c5fd5b2a986b279f88a7559d8409f7da3 (diff) | |
parent | b5dd884e682cae6b8c037f9d11f3b623b4cf2011 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (43 commits)
net: Fix 'Re: PACKET_TX_RING: packet size is too long'
netdev: usb: dm9601.c can drive a device not supported yet, add support for it
qlge: Fix firmware mailbox command timeout.
qlge: Fix EEH handling.
AF_RAW: Augment raw_send_hdrinc to expand skb to fit iphdr->ihl (v2)
bonding: fix a race condition in calls to slave MII ioctls
virtio-net: fix data corruption with OOM
sfc: Set ip_summed correctly for page buffers passed to GRO
cnic: Fix L2CTX_STATUSB_NUM offset in context memory.
MAINTAINERS: rt2x00 list is moderated
airo: Reorder tests, check bounds before element
mac80211: fix for incorrect sequence number on hostapd injected frames
libertas spi: fix sparse errors
mac80211: trivial: fix spelling in mesh_hwmp
cfg80211: sme: deauthenticate on assoc failure
mac80211: keep auth state when assoc fails
mac80211: fix ibss joining
b43: add 'struct b43_wl' missing declaration
b43: Fix Bugzilla #14181 and the bug from the previous 'fix'
rt2x00: Fix crypto in TX frame for rt2800usb
...
Diffstat (limited to 'drivers/net/virtio_net.c')
-rw-r--r-- | drivers/net/virtio_net.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 3709d6af9abf..05630f2f6930 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c | |||
@@ -516,8 +516,7 @@ again: | |||
516 | /* Free up any pending old buffers before queueing new ones. */ | 516 | /* Free up any pending old buffers before queueing new ones. */ |
517 | free_old_xmit_skbs(vi); | 517 | free_old_xmit_skbs(vi); |
518 | 518 | ||
519 | /* Put new one in send queue and do transmit */ | 519 | /* Try to transmit */ |
520 | __skb_queue_head(&vi->send, skb); | ||
521 | capacity = xmit_skb(vi, skb); | 520 | capacity = xmit_skb(vi, skb); |
522 | 521 | ||
523 | /* This can happen with OOM and indirect buffers. */ | 522 | /* This can happen with OOM and indirect buffers. */ |
@@ -531,8 +530,17 @@ again: | |||
531 | } | 530 | } |
532 | return NETDEV_TX_BUSY; | 531 | return NETDEV_TX_BUSY; |
533 | } | 532 | } |
534 | |||
535 | vi->svq->vq_ops->kick(vi->svq); | 533 | vi->svq->vq_ops->kick(vi->svq); |
534 | |||
535 | /* | ||
536 | * Put new one in send queue. You'd expect we'd need this before | ||
537 | * xmit_skb calls add_buf(), since the callback can be triggered | ||
538 | * immediately after that. But since the callback just triggers | ||
539 | * another call back here, normal network xmit locking prevents the | ||
540 | * race. | ||
541 | */ | ||
542 | __skb_queue_head(&vi->send, skb); | ||
543 | |||
536 | /* Don't wait up for transmitted skbs to be freed. */ | 544 | /* Don't wait up for transmitted skbs to be freed. */ |
537 | skb_orphan(skb); | 545 | skb_orphan(skb); |
538 | nf_reset(skb); | 546 | nf_reset(skb); |