|
@@ -1969,6 +1969,7 @@ static void ata_scsi_rbuf_fill(struct ata_scsi_args *args,
|
|
|
static unsigned int ata_scsiop_inq_std(struct ata_scsi_args *args, u8 *rbuf)
|
|
static unsigned int ata_scsiop_inq_std(struct ata_scsi_args *args, u8 *rbuf)
|
|
|
{
|
|
{
|
|
|
const u8 versions[] = {
|
|
const u8 versions[] = {
|
|
|
|
|
+ 0x00,
|
|
|
0x60, /* SAM-3 (no version claimed) */
|
|
0x60, /* SAM-3 (no version claimed) */
|
|
|
|
|
|
|
|
0x03,
|
|
0x03,
|
|
@@ -1977,6 +1978,20 @@ static unsigned int ata_scsiop_inq_std(struct ata_scsi_args *args, u8 *rbuf)
|
|
|
0x02,
|
|
0x02,
|
|
|
0x60 /* SPC-3 (no version claimed) */
|
|
0x60 /* SPC-3 (no version claimed) */
|
|
|
};
|
|
};
|
|
|
|
|
+ const u8 versions_zbc[] = {
|
|
|
|
|
+ 0x00,
|
|
|
|
|
+ 0xA0, /* SAM-5 (no version claimed) */
|
|
|
|
|
+
|
|
|
|
|
+ 0x04,
|
|
|
|
|
+ 0xC0, /* SBC-3 (no version claimed) */
|
|
|
|
|
+
|
|
|
|
|
+ 0x04,
|
|
|
|
|
+ 0x60, /* SPC-4 (no version claimed) */
|
|
|
|
|
+
|
|
|
|
|
+ 0x60,
|
|
|
|
|
+ 0x20, /* ZBC (no version claimed) */
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
u8 hdr[] = {
|
|
u8 hdr[] = {
|
|
|
TYPE_DISK,
|
|
TYPE_DISK,
|
|
|
0,
|
|
0,
|
|
@@ -1991,6 +2006,11 @@ static unsigned int ata_scsiop_inq_std(struct ata_scsi_args *args, u8 *rbuf)
|
|
|
if (ata_id_removeable(args->id))
|
|
if (ata_id_removeable(args->id))
|
|
|
hdr[1] |= (1 << 7);
|
|
hdr[1] |= (1 << 7);
|
|
|
|
|
|
|
|
|
|
+ if (args->dev->class == ATA_DEV_ZAC) {
|
|
|
|
|
+ hdr[0] = TYPE_ZBC;
|
|
|
|
|
+ hdr[2] = 0x6; /* ZBC is defined in SPC-4 */
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
memcpy(rbuf, hdr, sizeof(hdr));
|
|
memcpy(rbuf, hdr, sizeof(hdr));
|
|
|
memcpy(&rbuf[8], "ATA ", 8);
|
|
memcpy(&rbuf[8], "ATA ", 8);
|
|
|
ata_id_string(args->id, &rbuf[16], ATA_ID_PROD, 16);
|
|
ata_id_string(args->id, &rbuf[16], ATA_ID_PROD, 16);
|
|
@@ -2003,7 +2023,10 @@ static unsigned int ata_scsiop_inq_std(struct ata_scsi_args *args, u8 *rbuf)
|
|
|
if (rbuf[32] == 0 || rbuf[32] == ' ')
|
|
if (rbuf[32] == 0 || rbuf[32] == ' ')
|
|
|
memcpy(&rbuf[32], "n/a ", 4);
|
|
memcpy(&rbuf[32], "n/a ", 4);
|
|
|
|
|
|
|
|
- memcpy(rbuf + 59, versions, sizeof(versions));
|
|
|
|
|
|
|
+ if (args->dev->class == ATA_DEV_ZAC)
|
|
|
|
|
+ memcpy(rbuf + 58, versions_zbc, sizeof(versions_zbc));
|
|
|
|
|
+ else
|
|
|
|
|
+ memcpy(rbuf + 58, versions, sizeof(versions));
|
|
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
|
}
|
|
}
|