Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1206846

[PATCH RESEND V2 6/7] scsi: storvsc: Allow write_same when host is windows 10

From "K. Y. Srinivasan" <kys@microsoft.com>
Newsgroups linux.kernel
Subject [PATCH RESEND V2 6/7] scsi: storvsc: Allow write_same when host is windows 10
Date 2015-08-13 16:20 +0200
Message-ID <pX1wn-5Ix-29@gated-at.bofh.it> (permalink)
References <pX1wm-5Ix-3@gated-at.bofh.it> <pX1wm-5Ix-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Keith Mange <keith.mange@microsoft.com>

Allow WRITE_SAME for Windows10 and above hosts.

Tested-by: Alex Ng <alexng@microsoft.com>
Signed-off-by: Keith Mange <keith.mange@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
---
 drivers/scsi/storvsc_drv.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
index 58fa47a..021cbdf 100644
--- a/drivers/scsi/storvsc_drv.c
+++ b/drivers/scsi/storvsc_drv.c
@@ -1488,7 +1488,8 @@ static int storvsc_device_configure(struct scsi_device *sdevice)
 
 	/*
 	 * If the host is WIN8 or WIN8 R2, claim conformance to SPC-3
-	 * if the device is a MSFT virtual device.
+	 * if the device is a MSFT virtual device.  If the host is
+	 * WIN10 or newer, allow write_same.
 	 */
 	if (!strncmp(sdevice->vendor, "Msft", 4)) {
 		switch (vmstor_proto_version) {
@@ -1497,6 +1498,9 @@ static int storvsc_device_configure(struct scsi_device *sdevice)
 			sdevice->scsi_level = SCSI_SPC_3;
 			break;
 		}
+
+		if (vmstor_proto_version >= VMSTOR_PROTO_VERSION_WIN10)
+			sdevice->no_write_same = 0;
 	}
 
 	return 0;
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH RESEND V2 1/7] scsi: storvsc: Rather than look for sets of specific protocol versions, make decisions based on ranges. "K. Y. Srinivasan" <kys@microsoft.com> - 2015-08-13 16:20 +0200
  [PATCH RESEND V2 2/7] scsi: storvsc: Use a single value to track protocol versions "K. Y. Srinivasan" <kys@microsoft.com> - 2015-08-13 16:20 +0200
  [PATCH RESEND V2 6/7] scsi: storvsc: Allow write_same when host is windows 10 "K. Y. Srinivasan" <kys@microsoft.com> - 2015-08-13 16:20 +0200
  [PATCH RESEND V2 7/7] scsi: storvsc: Set the error code correctly in failure conditions "K. Y. Srinivasan" <kys@microsoft.com> - 2015-08-13 16:20 +0200
  [PATCH RESEND V2 5/7] scsi: storvsc: use storage protocol version to determine storage capabilities "K. Y. Srinivasan" <kys@microsoft.com> - 2015-08-13 16:20 +0200
  [PATCH RESEND V2 4/7] scsi: storvsc: use correct defaults for values determined by protocol negotiation "K. Y. Srinivasan" <kys@microsoft.com> - 2015-08-13 16:30 +0200

csiph-web