From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757165AbbE2VOk (ORCPT ); Fri, 29 May 2015 17:14:40 -0400 Received: from mail-bn1bbn0108.outbound.protection.outlook.com ([157.56.111.108]:26050 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756858AbbE2VOb convert rfc822-to-8bit (ORCPT ); Fri, 29 May 2015 17:14:31 -0400 X-Greylist: delayed 1288 seconds by postgrey-1.27 at vger.kernel.org; Fri, 29 May 2015 17:14:31 EDT From: Long Li To: KY Srinivasan , "gregkh@linuxfoundation.org" , "linux-kernel@vger.kernel.org" , "devel@linuxdriverproject.org" , "ohering@suse.com" , "jbottomley@parallels.com" , "hch@infradead.org" , "linux-scsi@vger.kernel.org" , "apw@canonical.com" , "vkuznets@redhat.com" , "jasowang@redhat.com" CC: Keith Mange Subject: RE: [PATCH 6/6] scsi: storvsc: Allow write_same when host is windows 10 Thread-Topic: [PATCH 6/6] scsi: storvsc: Allow write_same when host is windows 10 Thread-Index: AQHQmkLZsxgfnp0vjk+oHHX9VP0HKp2Tap4w Date: Fri, 29 May 2015 20:39:52 +0000 Message-ID: References: <1432931336-14434-1-git-send-email-kys@microsoft.com> <1432931359-14473-1-git-send-email-kys@microsoft.com> <1432931359-14473-6-git-send-email-kys@microsoft.com> In-Reply-To: <1432931359-14473-6-git-send-email-kys@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=longli@microsoft.com; x-originating-ip: [2001:4898:80e0:ee43::2] x-microsoft-exchange-diagnostics: 1;DM2PR03MB478;3:U6WrvE7mHugo4h5F7puXR41ZlvcWhW3FBZyfIzvFNaNFI/FVRmMFXStKiSG8Jki+PBxBOdT1bnIs99oWjDA77bAjg6fV7GocCfYnPrFSoKAQePV5TtFGm1+zsNpyoxLdny8IR+MndxOp63mo22FD9g==;10:2o3Bsx4zJVgRm+WPFXl1mkyrFEBLcKflakDV0Sd6L5SK5QCYsBj12Ey7MWjMa4/xQ/aXlL4flLas+a+MAitUQpjmG4sbsN5TYWtOn/t2kwU=;6:F3q15ThaJiJU93YYFl81jMRWIZm4l1kNmZ7FRr4y9OqSh+wqRh92aWu7kyNVGK9D x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM2PR03MB478; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(2401001)(5005006)(520003)(3002001);SRVR:DM2PR03MB478;BCL:0;PCL:0;RULEID:;SRVR:DM2PR03MB478; x-forefront-prvs: 059185FE08 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(51704005)(189002)(13464003)(199003)(377454003)(2421001)(2900100001)(40100003)(122556002)(1720100001)(76176999)(54356999)(19580405001)(19580395003)(86612001)(77096005)(68736005)(5001860100001)(102836002)(5001830100001)(46102003)(2950100001)(2561002)(15975445007)(81156007)(5002640100001)(5001770100001)(4001540100001)(97736004)(5001960100002)(2201001)(107886002)(76576001)(99286002)(106356001)(189998001)(2656002)(105586002)(86362001)(87936001)(33656002)(101416001)(1511001)(64706001)(92566002)(62966003)(50986999)(2501003)(74316001)(77156002)(106116001)(921003)(3826002)(4001430100001)(1121003);DIR:OUT;SFP:1102;SCL:1;SRVR:DM2PR03MB478;H:DM2PR03MB416.namprd03.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-originalarrivaltime: 29 May 2015 20:39:52.5706 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR03MB478 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: devel [mailto:driverdev-devel-bounces@linuxdriverproject.org] On > Behalf Of K. Y. Srinivasan > Sent: Friday, May 29, 2015 1:29 PM > To: gregkh@linuxfoundation.org; linux-kernel@vger.kernel.org; > devel@linuxdriverproject.org; ohering@suse.com; jbottomley@parallels.com; > hch@infradead.org; linux-scsi@vger.kernel.org; apw@canonical.com; > vkuznets@redhat.com; jasowang@redhat.com > Cc: Keith Mange > Subject: [PATCH 6/6] scsi: storvsc: Allow write_same when host is windows 10 > > From: keith.mange@microsoft.com > > Allow WRITE_SAME for Windows10 and above hosts. > Reviewed-by: Long Li > Tested-by: Alex Ng > Signed-off-by: Keith Mange > Signed-off-by: K. Y. Srinivasan > --- > 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 > > _______________________________________________ > devel mailing list > devel@linuxdriverproject.org > http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel