qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] virtio-scsi: sense in virtio_scsi_command_compl


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH] virtio-scsi: sense in virtio_scsi_command_complete
Date: Mon, 27 Oct 2014 10:22:13 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0

On 10/27/2014 09:51 AM, Ting Wang wrote:
> If req->resp.cmd.status is not GOOD, the address of sense for
> qemu_iovec_from_buf should be modified from &req->resp to sense.
> 
> Signed-off-by: Ting Wang <address@hidden>
> ---
>  hw/scsi/virtio-scsi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c
> index a1725b8..fe094a5 100644
> --- a/hw/scsi/virtio-scsi.c
> +++ b/hw/scsi/virtio-scsi.c
> @@ -448,7 +448,7 @@ static void virtio_scsi_command_complete(SCSIRequest *r, 
> uint32_t status,
>          sense_len = scsi_req_get_sense(r, sense, sizeof(sense));
>          sense_len = MIN(sense_len, req->resp_iov.size - 
> sizeof(req->resp.cmd));
>          qemu_iovec_from_buf(&req->resp_iov, sizeof(req->resp.cmd),
> -                            &req->resp, sense_len);
> +                            sense, sense_len);
>          req->resp.cmd.sense_len = virtio_tswap32(vdev, sense_len);
>      }
>      virtio_scsi_complete_cmd_req(req);
> 

Embarrassing.  Thanks, applied.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]