All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Ting Wang <kathy.wangting@huawei.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] virtio-scsi: sense in virtio_scsi_command_complete
Date: Mon, 27 Oct 2014 10:22:13 +0100	[thread overview]
Message-ID: <544E0EC5.7020507@redhat.com> (raw)
In-Reply-To: <1414399901-231824-1-git-send-email-kathy.wangting@huawei.com>

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 <kathy.wangting@huawei.com>
> ---
>  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	other threads:[~2014-10-27  9:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-27  8:51 [Qemu-devel] [PATCH] virtio-scsi: sense in virtio_scsi_command_complete Ting Wang
2014-10-27  9:22 ` Paolo Bonzini [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=544E0EC5.7020507@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=kathy.wangting@huawei.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.