From: "K. Y. Srinivasan" <kys@microsoft.com>
To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
devel@linuxdriverproject.org, virtualization@lists.osdl.org,
ohering@suse.com, jbottomley@parallels.com, hch@infradead.org,
linux-scsi@vger.kernel.org
Cc: "K. Y. Srinivasan" <kys@microsoft.com>
Subject: [PATCH 2/2] Drivers: scsi: storvsc: Don't pass ATA_16 command to the host
Date: Fri, 16 Mar 2012 13:24:32 -0700 [thread overview]
Message-ID: <1331929472-6877-2-git-send-email-kys@microsoft.com> (raw)
In-Reply-To: <1331929472-6877-1-git-send-email-kys@microsoft.com>
The current Windows hosts don't handle the ATA_16 command and furthermore
return a generic error code after filtering the command on the host side.
For now filter the command on the guest side until the host is modified to
properly handle unsupported commands.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
---
drivers/scsi/storvsc_drv.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
index 8b967c9..783bab8 100644
--- a/drivers/scsi/storvsc_drv.c
+++ b/drivers/scsi/storvsc_drv.c
@@ -1229,8 +1229,17 @@ static bool storvsc_scsi_cmd_ok(struct scsi_cmnd *scmnd)
/*
* smartd sends this command and the host does not handle
* this. So, don't send it.
+ * The current Windows hosts implement a subset of scsi commands
+ * and for the commands that are not implemented, the host filters
+ * them and returns a generic failure SRB status. I have been in
+ * discussions with the Windows team to return the appropriate SRB
+ * status code for unsupported scsi commands and while they have
+ * agreed to implement this, it is not clear when this change will be
+ * available. Consequently, filtering the command before submitting it
+ * to the host is a resonable interim solution.
*/
case SET_WINDOW:
+ case ATA_16:
scmnd->result = ILLEGAL_REQUEST << 16;
allowed = false;
break;
--
1.7.4.1
next prev parent reply other threads:[~2012-03-16 20:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-16 20:24 [PATCH 0000/0002] drivers: scsi: storvsc K. Y. Srinivasan
2012-03-16 20:24 ` [PATCH 1/2] Drivers: scsi: storvsc: Set the scsi result correctly when SRB status is INVALID K. Y. Srinivasan
2012-03-16 20:24 ` K. Y. Srinivasan [this message]
2012-03-17 15:04 ` [PATCH 2/2] Drivers: scsi: storvsc: Don't pass ATA_16 command to the host Jeff Garzik
2012-03-17 18:55 ` Douglas Gilbert
2012-03-18 1:40 ` KY Srinivasan
2012-03-16 20:36 ` [PATCH 1/2] Drivers: scsi: storvsc: Set the scsi result correctly when SRB status is INVALID Greg KH
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=1331929472-6877-2-git-send-email-kys@microsoft.com \
--to=kys@microsoft.com \
--cc=devel@linuxdriverproject.org \
--cc=gregkh@linuxfoundation.org \
--cc=hch@infradead.org \
--cc=jbottomley@parallels.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=ohering@suse.com \
--cc=virtualization@lists.osdl.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