libata-scsi: set correct VERSION field for ZAC devices
authorTom Yan <tom.ty89@gmail.com>
Tue, 12 Jul 2016 14:12:01 +0000 (22:12 +0800)
committerTejun Heo <tj@kernel.org>
Tue, 12 Jul 2016 14:46:45 +0000 (10:46 -0400)
Commit 856c46639309 ("libata: support device-managed ZAC devices")
had the line that "bumps" the VERSION field in standard INQUIRY data
removed. Add it back and claim SPC-5 version compatibility, which
matches with the current version descriptor "SPC-5 (no version claimed)"
that is used for ZAC devices.

Signed-off-by: Tom Yan <tom.ty89@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
drivers/ata/libata-scsi.c

index c9cd216..3e79485 100644 (file)
@@ -2109,8 +2109,10 @@ static unsigned int ata_scsiop_inq_std(struct ata_scsi_args *args, u8 *rbuf)
            (args->dev->link->ap->pflags & ATA_PFLAG_EXTERNAL))
                hdr[1] |= (1 << 7);
 
-       if (args->dev->class == ATA_DEV_ZAC)
+       if (args->dev->class == ATA_DEV_ZAC) {
                hdr[0] = TYPE_ZBC;
+               hdr[2] = 0x7; /* claim SPC-5 version compatibility */
+       }
 
        memcpy(rbuf, hdr, sizeof(hdr));
        memcpy(&rbuf[8], "ATA     ", 8);