[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1414003404-505-12-git-send-email-mst@redhat.com>
Date: Wed, 22 Oct 2014 21:44:51 +0300
From: "Michael S. Tsirkin" <mst@...hat.com>
To: linux-kernel@...r.kernel.org
Cc: Cornelia Huck <cornelia.huck@...ibm.com>,
Thomas Huth <thuth@...ux.vnet.ibm.com>,
David Hildenbrand <dahi@...ux.vnet.ibm.com>,
Rusty Russell <rusty@...tcorp.com.au>,
virtualization@...ts.linux-foundation.org
Subject: [PATCH RFC v3 11/16] virtio_blk: use virtio v1.0 endian
From: Cornelia Huck <cornelia.huck@...ibm.com>
Note that we care only about the fields still in use for virtio v1.0.
Reviewed-by: Thomas Huth <thuth@...ux.vnet.ibm.com>
Reviewed-by: David Hildenbrand <dahi@...ux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@...ibm.com>
Signed-off-by: Michael S. Tsirkin <mst@...hat.com>
---
drivers/block/virtio_blk.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
index c6a27d5..327e601 100644
--- a/drivers/block/virtio_blk.c
+++ b/drivers/block/virtio_blk.c
@@ -113,6 +113,10 @@ static int __virtblk_add_req(struct virtqueue *vq,
sg_init_one(&status, &vbr->status, sizeof(vbr->status));
sgs[num_out + num_in++] = &status;
+ /* we only care about fields valid for virtio-1 */
+ vbr->out_hdr.type = cpu_to_virtio32(vq->vdev, vbr->out_hdr.type);
+ vbr->out_hdr.sector = cpu_to_virtio64(vq->vdev, vbr->out_hdr.sector);
+
return virtqueue_add_sgs(vq, sgs, num_out, num_in, vbr, GFP_ATOMIC);
}
--
MST
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists