summaryrefslogtreecommitdiff
path: root/drivers/ata
diff options
context:
space:
mode:
authorShaun Tancheff <shaun@tancheff.com>2016-09-09 19:44:19 +0300
committerTejun Heo <tj@kernel.org>2016-09-09 22:21:21 +0300
commit0ce1b18c42a5b1613ad84d3bf93ee4f5bb3f8b33 (patch)
tree667484ca2aa5a79bbac59b10ae996638cd7f11ca /drivers/ata
parent0b9e2988ab2261fd6d4a0039edf81ed1e3662be8 (diff)
downloadlinux-0ce1b18c42a5b1613ad84d3bf93ee4f5bb3f8b33.tar.xz
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>
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/libata-scsi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index 2f5487f02de1..9cceb4a875a5 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) ||