Преглед изворни кода

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>
Shaun Tancheff пре 9 година
родитељ
комит
0ce1b18c42
1 измењених фајлова са 3 додато и 3 уклоњено
  1. 3 3
      drivers/ata/libata-scsi.c

+ 3 - 3
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) ||