From: Fam Zheng <famz@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] virtio-scsi: actually honor sense_size from configuration space
Date: Fri, 14 Mar 2014 13:45:40 +0800 [thread overview]
Message-ID: <20140314054540.GF31322@T430.nay.redhat.com> (raw)
In-Reply-To: <1394101677-21745-1-git-send-email-pbonzini@redhat.com>
On Thu, 03/06 11:27, Paolo Bonzini wrote:
> We were always truncating the sense size to 96 bytes.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> hw/scsi/virtio-scsi.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c
> index 6610b3a..b0d7517 100644
> --- a/hw/scsi/virtio-scsi.c
> +++ b/hw/scsi/virtio-scsi.c
> @@ -304,6 +304,8 @@ static void virtio_scsi_command_complete(SCSIRequest *r, uint32_t status,
> size_t resid)
> {
> VirtIOSCSIReq *req = r->hba_private;
> + VirtIOSCSI *s = req->dev;
> + VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(s);
> uint32_t sense_len;
>
> if (r->io_canceled) {
> @@ -317,7 +319,7 @@ static void virtio_scsi_command_complete(SCSIRequest *r, uint32_t status,
> } else {
> req->resp.cmd->resid = 0;
> sense_len = scsi_req_get_sense(r, req->resp.cmd->sense,
> - VIRTIO_SCSI_SENSE_SIZE);
> + vs->sense_size);
> req->resp.cmd->sense_len = tswap32(sense_len);
> }
> virtio_scsi_complete_req(req);
> --
> 1.8.5.3
>
Reviewed-by: Fam Zheng <famz@redhat.com>
next prev parent reply other threads:[~2014-03-14 5:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-06 10:27 [Qemu-devel] [PATCH] virtio-scsi: actually honor sense_size from configuration space Paolo Bonzini
2014-03-07 7:40 ` Fam Zheng
2014-03-07 8:40 ` Paolo Bonzini
2014-03-14 5:45 ` Fam Zheng [this message]
2014-03-14 5:52 ` Fam Zheng
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=20140314054540.GF31322@T430.nay.redhat.com \
--to=famz@redhat.com \
--cc=pbonzini@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).