Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c49a6bf5 authored by Keith Busch's avatar Keith Busch Committed by Tejun Heo
Browse files

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: default avatarKeith Busch <keith.busch@intel.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent 7a56c0ba
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1993,6 +1993,10 @@ static unsigned int ata_scsiop_inq_std(struct ata_scsi_args *args, u8 *rbuf)
	memcpy(rbuf, hdr, sizeof(hdr));
	memcpy(&rbuf[8], "ATA     ", 8);
	ata_id_string(args->id, &rbuf[16], ATA_ID_PROD, 16);

	/* From SAT, use last 2 words from fw rev unless they are spaces */
	ata_id_string(args->id, &rbuf[32], ATA_ID_FW_REV + 2, 4);
	if (strncmp(&rbuf[32], "    ", 4) == 0)
		ata_id_string(args->id, &rbuf[32], ATA_ID_FW_REV, 4);

	if (rbuf[32] == 0 || rbuf[32] == ' ')