libata: Some drives failing on SCT Write Same

Restrict support SCT Write Same to devices which also support ZAC where
support is required.

Reported-by: Mike Krinkin <krinkin.m.u@gmail.com>
Signed-off-by: Shaun Tancheff <shaun.tancheff@seagate.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
Shaun Tancheff 2016-09-09 11:44:19 -05:00 committed by Tejun Heo
parent 0b9e2988ab
commit 0ce1b18c42

View File

@ -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) ||