From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Krinkin Subject: Re: [PATCH] Some drives failing on SCT Write Same Date: Fri, 9 Sep 2016 20:52:15 +0300 Message-ID: <20160909175211.GA3978@gmail.com> References: <20160909164419.12978-1-shaun@tancheff.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-scsi-owner@vger.kernel.org To: Shaun Tancheff Cc: Tejun Heo , linux-ide@vger.kernel.org, linux-scsi@vger.kernel.org, "James E . J . Bottomley" , "Martin K. Petersen" , Christoph Hellwig , Shaun Tancheff List-Id: linux-ide@vger.kernel.org On Fri, Sep 09, 2016 at 11:48:51AM -0500, Shaun Tancheff wrote: > Mike, > > Can you confirm if this fix works for you? > > I tested the patch is tested on top of next-20160909. Works for me too, thank you. > > Thanks! > --Shaun > > On Fri, Sep 9, 2016 at 11:44 AM, Shaun Tancheff wrote: > > > Restrict support SCT Write Same to devices which also support ZAC where > > support is required. > > > > Reported-by: Mike Krinkin > > Signed-off-by: Shaun Tancheff > > --- > > drivers/ata/libata-scsi.c | 6 +++--- > > 1 file changed, 3 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c > > index 2f5487f..9cceb4a 100644 > > --- a/drivers/ata/libata-scsi.c > > +++ b/drivers/ata/libata-scsi.c > > @@ -3562,9 +3562,9 @@ static unsigned int ata_scsiop_maint_in(struct > > ata_scsi_args *args, u8 *rbuf) > > supported = 3; > > break; > > case WRITE_SAME_16: > > - if (ata_id_sct_write_same(dev->id)) > > - supported = 3; > > - break; > > + if (!ata_id_sct_write_same(dev->id)) > > + break; > > + /* fallthrough: if SCT ... only enable for ZBC */ > > case ZBC_IN: > > case ZBC_OUT: > > if (ata_id_zoned_cap(dev->id) || > > -- > > 2.9.3 > > > > > > > -- > Shaun Tancheff