diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-11-12 14:13:31 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-11-12 14:13:31 -0500 |
commit | 05f3f415894d061f7d3e77e3d46caeb4c184b005 (patch) | |
tree | d49254d7ae4759ab85a2944843f73adaa6865e0a /drivers/net | |
parent | e697b8d13ede3893724898d983eff3f8c9183643 (diff) | |
parent | 42b36cc0ce717deeb10030141a43dede763a3ebe (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-virtio
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-virtio:
virtio: Force use of power-of-two for descriptor ring sizes
lguest: Fix lguest virtio-blk backend size computation
virtio: Fix used_idx wrap-around
virtio: more fallout from scatterlist changes.
virtio: fix vring_init for 64 bits
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/virtio_net.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index e396c9d2af8d..a75be57fb209 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c | |||
@@ -146,6 +146,7 @@ static void try_fill_recv(struct virtnet_info *vi) | |||
146 | struct scatterlist sg[1+MAX_SKB_FRAGS]; | 146 | struct scatterlist sg[1+MAX_SKB_FRAGS]; |
147 | int num, err; | 147 | int num, err; |
148 | 148 | ||
149 | sg_init_table(sg, 1+MAX_SKB_FRAGS); | ||
149 | for (;;) { | 150 | for (;;) { |
150 | skb = netdev_alloc_skb(vi->dev, MAX_PACKET_LEN); | 151 | skb = netdev_alloc_skb(vi->dev, MAX_PACKET_LEN); |
151 | if (unlikely(!skb)) | 152 | if (unlikely(!skb)) |
@@ -231,6 +232,8 @@ static int start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
231 | const unsigned char *dest = ((struct ethhdr *)skb->data)->h_dest; | 232 | const unsigned char *dest = ((struct ethhdr *)skb->data)->h_dest; |
232 | DECLARE_MAC_BUF(mac); | 233 | DECLARE_MAC_BUF(mac); |
233 | 234 | ||
235 | sg_init_table(sg, 1+MAX_SKB_FRAGS); | ||
236 | |||
234 | pr_debug("%s: xmit %p %s\n", dev->name, skb, print_mac(mac, dest)); | 237 | pr_debug("%s: xmit %p %s\n", dev->name, skb, print_mac(mac, dest)); |
235 | 238 | ||
236 | free_old_xmit_skbs(vi); | 239 | free_old_xmit_skbs(vi); |