Skip to content

Commit

Permalink
libata-scsi: set correct VERSION field for ZAC devices
Browse files Browse the repository at this point in the history
Commit 856c466 ("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 <[email protected]>
Signed-off-by: Tejun Heo <[email protected]>
  • Loading branch information
tomty89 authored and htejun committed Jul 12, 2016
1 parent 8554e5e commit 56b8cba
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/ata/libata-scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 56b8cba

Please sign in to comment.