From: Guenter Roeck <linux@roeck-us.net>
To: Hannes Reinecke <hare@suse.de>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>,
Christoph Hellwig <hch@lst.de>,
James Bottomley <james.bottomley@hansenpartnership.com>,
linux-scsi@vger.kernel.org, Jiri Slaby <jirislaby@kernel.org>
Subject: Re: [PATCHv2] virtio_scsi: do not overwrite SCSI status
Date: Sat, 3 Jul 2021 11:35:10 -0700 [thread overview]
Message-ID: <20210703183510.GA1235060@roeck-us.net> (raw)
In-Reply-To: <20210622091153.29231-1-hare@suse.de>
Hi,
On Tue, Jun 22, 2021 at 11:11:53AM +0200, Hannes Reinecke wrote:
> When a sense code is present we should not override the scsi status;
> the driver already sets it based on the response from the hypervisor.
>
> Fixes: 464a00c9e0ad ("scsi: core: Kill DRIVER_SENSE")
> Signed-off-by: Hannes Reinecke <hare@suse.de>
> Tested-by: Guenter Roeck <linux@roeck-us.net>
> Tested-by: Jiri Slaby <jirislaby@kernel.org>
> Tested-by: Christian Borntraeger <borntraeger@de.ibm.com>
This patch didn't make it into mainline, but commit 464a00c9e0ad is
there. This means that virtio_scsi is now broken in mainline (as of
v5.13-9356-g4b820e167bf6). Did it get lost, or is it still queued
somewhere ?
Thanks,
Guenter
> ---
> drivers/scsi/virtio_scsi.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c
> index fd69a03d6137..ad78bf631900 100644
> --- a/drivers/scsi/virtio_scsi.c
> +++ b/drivers/scsi/virtio_scsi.c
> @@ -156,12 +156,11 @@ static void virtscsi_complete_cmd(struct virtio_scsi *vscsi, void *buf)
>
> WARN_ON(virtio32_to_cpu(vscsi->vdev, resp->sense_len) >
> VIRTIO_SCSI_SENSE_SIZE);
> - if (sc->sense_buffer) {
> + if (resp->sense_len) {
> memcpy(sc->sense_buffer, resp->sense,
> min_t(u32,
> virtio32_to_cpu(vscsi->vdev, resp->sense_len),
> VIRTIO_SCSI_SENSE_SIZE));
> - set_status_byte(sc, SAM_STAT_CHECK_CONDITION);
> }
>
> sc->scsi_done(sc);
next prev parent reply other threads:[~2021-07-03 18:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-22 9:11 [PATCHv2] virtio_scsi: do not overwrite SCSI status Hannes Reinecke
2021-06-23 1:50 ` Martin K. Petersen
2021-06-23 5:33 ` [Re: " Christian Borntraeger
2021-06-29 4:10 ` Martin K. Petersen
2021-07-03 18:35 ` Guenter Roeck [this message]
2021-07-03 22:09 ` Martin K. Petersen
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=20210703183510.GA1235060@roeck-us.net \
--to=linux@roeck-us.net \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=james.bottomley@hansenpartnership.com \
--cc=jirislaby@kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
/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