From: "K. Y. Srinivasan" <kys@microsoft.com>
To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
devel@linuxdriverproject.org, ohering@suse.com,
apw@canonical.com, jasowang@redhat.com, jbottomley@parallels.com,
hch@infradead.org, linux-scsi@vger.kernel.org
Cc: "K. Y. Srinivasan" <kys@microsoft.com>
Subject: [PATCH 1/1] Drivers: scsi: storvsc: Add blist flags
Date: Sun, 20 Jul 2014 20:33:42 -0700 [thread overview]
Message-ID: <1405913622-14266-1-git-send-email-kys@microsoft.com> (raw)
Add blist flags to permit the reading of the VPD pages even when
the target may claim SPC-2 compliance. MSFT targets currently
claim SPC-2 compliance while they implement post SPC-2 features.
With this patch we can correctly handle WRITE_SAME_16 issues.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
---
drivers/scsi/storvsc_drv.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
index 29d0329..2a58dc4 100644
--- a/drivers/scsi/storvsc_drv.c
+++ b/drivers/scsi/storvsc_drv.c
@@ -42,6 +42,7 @@
#include <scsi/scsi_eh.h>
#include <scsi/scsi_devinfo.h>
#include <scsi/scsi_dbg.h>
+#include "scsi_priv.h"
/*
* All wire protocol details (storage protocol between the guest and the host)
@@ -327,6 +328,8 @@ MODULE_PARM_DESC(storvsc_ringbuffer_size, "Ring buffer size (bytes)");
*/
static int storvsc_timeout = 180;
+static int msft_blist_flags = BLIST_TRY_VPD_PAGES;
+
#define STORVSC_MAX_IO_REQUESTS 200
static void storvsc_on_channel_callback(void *context);
@@ -1438,6 +1441,8 @@ static void storvsc_device_destroy(struct scsi_device *sdevice)
static int storvsc_device_configure(struct scsi_device *sdevice)
{
+ int blist_flags;
+
scsi_adjust_queue_depth(sdevice, MSG_SIMPLE_TAG,
STORVSC_MAX_IO_REQUESTS);
@@ -1449,6 +1454,14 @@ static int storvsc_device_configure(struct scsi_device *sdevice)
sdevice->no_write_same = 1;
+ blist_flags = scsi_get_device_flags_keyed(sdevice, "Msft",
+ "Virtual Disk",
+ SCSI_DEVINFO_GLOBAL);
+
+ if (blist_flags != msft_blist_flags)
+ scsi_dev_info_list_add_keyed(1, "Msft", "Virtual Disk", NULL,
+ msft_blist_flags,
+ SCSI_DEVINFO_GLOBAL);
return 0;
}
--
1.7.4.1
next reply other threads:[~2014-07-21 2:32 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-21 3:33 K. Y. Srinivasan [this message]
2014-07-21 11:27 ` [PATCH 1/1] Drivers: scsi: storvsc: Add blist flags Christoph Hellwig
2014-07-21 13:19 ` KY Srinivasan
2014-07-21 23:06 K. Y. Srinivasan
2014-07-23 10:04 ` Sitsofe Wheeler
2014-07-23 11:51 ` Christoph Hellwig
2014-07-23 12:54 ` Sitsofe Wheeler
2014-07-23 14:10 ` Christoph Hellwig
2014-07-23 15:31 ` Sitsofe Wheeler
2014-07-23 15:40 ` KY Srinivasan
2014-07-23 15:39 ` KY Srinivasan
2014-07-23 14:10 ` Sitsofe Wheeler
2014-07-23 14:15 ` Christoph Hellwig
2014-07-23 20:13 ` Sitsofe Wheeler
2014-07-24 5:40 ` Hannes Reinecke
2014-08-01 19:48 ` Sitsofe Wheeler
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=1405913622-14266-1-git-send-email-kys@microsoft.com \
--to=kys@microsoft.com \
--cc=apw@canonical.com \
--cc=devel@linuxdriverproject.org \
--cc=gregkh@linuxfoundation.org \
--cc=hch@infradead.org \
--cc=jasowang@redhat.com \
--cc=jbottomley@parallels.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=ohering@suse.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;
as well as URLs for NNTP newsgroup(s).