aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
authorKeith Busch <keith.busch@intel.com>2014-05-01 13:12:03 -0400
committerTejun Heo <tj@kernel.org>2014-05-02 10:57:47 -0400
commitc49a6bf5eecd31f335df1a3700c92be1a824c6f0 (patch)
treedc104cfd104d13c7ff632e3dd4dfcc1737e0074d /drivers/ata
parent7a56c0ba266844d7b1964694c47eff2199986e83 (diff)
ata: SATL compliance for Inquiry Product Revision
The SCSI-to-ATA Translation standard says to use data words 25 and 26 unless they are spaces. For devices that use these words in the firmware field, they are generally more useful anyway. Signed-off-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/libata-scsi.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index ef8567de6a75..72691fd93948 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -1993,7 +1993,11 @@ static unsigned int ata_scsiop_inq_std(struct ata_scsi_args *args, u8 *rbuf)
1993 memcpy(rbuf, hdr, sizeof(hdr)); 1993 memcpy(rbuf, hdr, sizeof(hdr));
1994 memcpy(&rbuf[8], "ATA ", 8); 1994 memcpy(&rbuf[8], "ATA ", 8);
1995 ata_id_string(args->id, &rbuf[16], ATA_ID_PROD, 16); 1995 ata_id_string(args->id, &rbuf[16], ATA_ID_PROD, 16);
1996 ata_id_string(args->id, &rbuf[32], ATA_ID_FW_REV, 4); 1996
1997 /* From SAT, use last 2 words from fw rev unless they are spaces */
1998 ata_id_string(args->id, &rbuf[32], ATA_ID_FW_REV + 2, 4);
1999 if (strncmp(&rbuf[32], " ", 4) == 0)
2000 ata_id_string(args->id, &rbuf[32], ATA_ID_FW_REV, 4);
1997 2001
1998 if (rbuf[32] == 0 || rbuf[32] == ' ') 2002 if (rbuf[32] == 0 || rbuf[32] == ' ')
1999 memcpy(&rbuf[32], "n/a ", 4); 2003 memcpy(&rbuf[32], "n/a ", 4);