Re: [PATCH] Some drives failing on SCT Write Same

2016-09-09 Thread Tejun Heo
On Fri, Sep 09, 2016 at 11:44:19AM -0500, 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 

Applied to libata/for-4.9.

Thanks.

-- 
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] Some drives failing on SCT Write Same

2016-09-09 Thread Mike Krinkin
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
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] Some drives failing on SCT Write Same

2016-09-09 Thread Shaun Tancheff
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

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html