]> git.karo-electronics.de Git - linux-beck.git/commitdiff
libata: Some drives failing on SCT Write Same
authorShaun Tancheff <shaun@tancheff.com>
Fri, 9 Sep 2016 16:44:19 +0000 (11:44 -0500)
committerTejun Heo <tj@kernel.org>
Fri, 9 Sep 2016 19:21:21 +0000 (15:21 -0400)
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>
drivers/ata/libata-scsi.c

index 2f5487f02de14d143133971c0ba724c6dbe4c79a..9cceb4a875a58caa19fdd809ad82181f22676fc2 100644 (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) ||