From 0ce1b18c42a5b1613ad84d3bf93ee4f5bb3f8b33 Mon Sep 17 00:00:00 2001 From: Shaun Tancheff Date: Fri, 9 Sep 2016 11:44:19 -0500 Subject: 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 Signed-off-by: Shaun Tancheff Signed-off-by: Tejun Heo --- drivers/ata/libata-scsi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/ata') 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) || -- cgit v1.2.3