From: Linus Torvalds Date: Sat, 22 May 2010 00:22:52 +0000 (-0700) Subject: Merge branch 'virtio' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux... X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1756ac3d3c41341297ea25b818b7fce505bb2a9a;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git Merge branch 'virtio' of git://git./linux/kernel/git/rusty/linux-2.6-for-linus * 'virtio' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus: (27 commits) drivers/char: Eliminate use after free virtio: console: Accept console size along with resize control message virtio: console: Store each console's size in the console structure virtio: console: Resize console port 0 on config intr only if multiport is off virtio: console: Add support for nonblocking write()s virtio: console: Rename wait_is_over() to will_read_block() virtio: console: Don't always create a port 0 if using multiport virtio: console: Use a control message to add ports virtio: console: Move code around for future patches virtio: console: Remove config work handler virtio: console: Don't call hvc_remove() on unplugging console ports virtio: console: Return -EPIPE to hvc_console if we lost the connection virtio: console: Let host know of port or device add failures virtio: console: Add a __send_control_msg() that can send messages without a valid port virtio: Revert "virtio: disable multiport console support." virtio: add_buf_gfp trans_virtio: use virtqueue_xxx wrappers virtio-rng: use virtqueue_xxx wrappers virtio_ring: remove a level of indirection virtio_net: use virtqueue_xxx wrappers ... Fix up conflicts in drivers/net/virtio_net.c due to new virtqueue_xxx wrappers changes conflicting with some other cleanups. --- 1756ac3d3c41341297ea25b818b7fce505bb2a9a diff --cc drivers/net/virtio_net.c index b0a85d038796,91738d83dbdc..78eb3190b9b1 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@@ -336,11 -335,11 +336,11 @@@ static int add_recvbuf_small(struct vir skb_put(skb, MAX_PACKET_LEN); hdr = skb_vnet_hdr(skb); - sg_set_buf(sg, &hdr->hdr, sizeof hdr->hdr); + sg_set_buf(vi->rx_sg, &hdr->hdr, sizeof hdr->hdr); - skb_to_sgvec(skb, sg + 1, 0, skb->len); + skb_to_sgvec(skb, vi->rx_sg + 1, 0, skb->len); - err = vi->rvq->vq_ops->add_buf(vi->rvq, vi->rx_sg, 0, 2, skb); - err = virtqueue_add_buf(vi->rvq, sg, 0, 2, skb); ++ err = virtqueue_add_buf(vi->rvq, vi->rx_sg, 0, 2, skb); if (err < 0) dev_kfree_skb(skb); @@@ -385,7 -386,7 +385,7 @@@ static int add_recvbuf_big(struct virtn /* chain first in list head */ first->private = (unsigned long)list; - err = vi->rvq->vq_ops->add_buf(vi->rvq, vi->rx_sg, 0, MAX_SKB_FRAGS + 2, - err = virtqueue_add_buf(vi->rvq, sg, 0, MAX_SKB_FRAGS + 2, ++ err = virtqueue_add_buf(vi->rvq, vi->rx_sg, 0, MAX_SKB_FRAGS + 2, first); if (err < 0) give_pages(vi, first); @@@ -402,9 -404,9 +402,9 @@@ static int add_recvbuf_mergeable(struc if (!page) return -ENOMEM; - sg_init_one(&sg, page_address(page), PAGE_SIZE); + sg_init_one(vi->rx_sg, page_address(page), PAGE_SIZE); - err = vi->rvq->vq_ops->add_buf(vi->rvq, vi->rx_sg, 0, 1, page); - err = virtqueue_add_buf(vi->rvq, &sg, 0, 1, page); ++ err = virtqueue_add_buf(vi->rvq, vi->rx_sg, 0, 1, page); if (err < 0) give_pages(vi, page); @@@ -549,13 -554,12 +549,13 @@@ static int xmit_skb(struct virtnet_inf /* Encode metadata header at front. */ if (vi->mergeable_rx_bufs) - sg_set_buf(sg, &hdr->mhdr, sizeof hdr->mhdr); + sg_set_buf(vi->tx_sg, &hdr->mhdr, sizeof hdr->mhdr); else - sg_set_buf(sg, &hdr->hdr, sizeof hdr->hdr); + sg_set_buf(vi->tx_sg, &hdr->hdr, sizeof hdr->hdr); - hdr->num_sg = skb_to_sgvec(skb, sg+1, 0, skb->len) + 1; - return virtqueue_add_buf(vi->svq, sg, hdr->num_sg, 0, skb); + hdr->num_sg = skb_to_sgvec(skb, vi->tx_sg + 1, 0, skb->len) + 1; - return vi->svq->vq_ops->add_buf(vi->svq, vi->tx_sg, hdr->num_sg, ++ return virtqueue_add_buf(vi->svq, vi->tx_sg, hdr->num_sg, + 0, skb); } static netdev_tx_t start_xmit(struct sk_buff *skb, struct net_device *dev)