diff options
Diffstat (limited to 'drivers/block/virtio_blk.c')
-rw-r--r-- | drivers/block/virtio_blk.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 0cfbe8c594a5..fb283af38023 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c | |||
@@ -35,7 +35,7 @@ struct virtblk_req | |||
35 | struct list_head list; | 35 | struct list_head list; |
36 | struct request *req; | 36 | struct request *req; |
37 | struct virtio_blk_outhdr out_hdr; | 37 | struct virtio_blk_outhdr out_hdr; |
38 | struct virtio_blk_inhdr in_hdr; | 38 | u8 status; |
39 | }; | 39 | }; |
40 | 40 | ||
41 | static void blk_done(struct virtqueue *vq) | 41 | static void blk_done(struct virtqueue *vq) |
@@ -48,7 +48,7 @@ static void blk_done(struct virtqueue *vq) | |||
48 | spin_lock_irqsave(&vblk->lock, flags); | 48 | spin_lock_irqsave(&vblk->lock, flags); |
49 | while ((vbr = vblk->vq->vq_ops->get_buf(vblk->vq, &len)) != NULL) { | 49 | while ((vbr = vblk->vq->vq_ops->get_buf(vblk->vq, &len)) != NULL) { |
50 | int uptodate; | 50 | int uptodate; |
51 | switch (vbr->in_hdr.status) { | 51 | switch (vbr->status) { |
52 | case VIRTIO_BLK_S_OK: | 52 | case VIRTIO_BLK_S_OK: |
53 | uptodate = 1; | 53 | uptodate = 1; |
54 | break; | 54 | break; |
@@ -101,7 +101,7 @@ static bool do_req(struct request_queue *q, struct virtio_blk *vblk, | |||
101 | sg_init_table(vblk->sg, VIRTIO_MAX_SG); | 101 | sg_init_table(vblk->sg, VIRTIO_MAX_SG); |
102 | sg_set_buf(&vblk->sg[0], &vbr->out_hdr, sizeof(vbr->out_hdr)); | 102 | sg_set_buf(&vblk->sg[0], &vbr->out_hdr, sizeof(vbr->out_hdr)); |
103 | num = blk_rq_map_sg(q, vbr->req, vblk->sg+1); | 103 | num = blk_rq_map_sg(q, vbr->req, vblk->sg+1); |
104 | sg_set_buf(&vblk->sg[num+1], &vbr->in_hdr, sizeof(vbr->in_hdr)); | 104 | sg_set_buf(&vblk->sg[num+1], &vbr->status, sizeof(vbr->status)); |
105 | 105 | ||
106 | if (rq_data_dir(vbr->req) == WRITE) { | 106 | if (rq_data_dir(vbr->req) == WRITE) { |
107 | vbr->out_hdr.type |= VIRTIO_BLK_T_OUT; | 107 | vbr->out_hdr.type |= VIRTIO_BLK_T_OUT; |