Re: [PATCH] ata: SATL compliance for Inquiry Product Revision

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 1 May 2014, Tejun Heo wrote:
On Tue, Apr 29, 2014 at 01:25:24PM -0600, Keith Busch wrote:
@@ -1993,7 +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);
-	ata_id_string(args->id, &rbuf[32], ATA_ID_FW_REV, 4);
+	if (args->id[25] == 0x2020 && args->id[26] == 0x2020)

Maybe strncmp(" ") is more readable?  And can you please add some
comment explaining what's going on?

Sounds good. Will do a v2 with that.

+		ata_id_string(args->id, &rbuf[32], ATA_ID_FW_REV, 4);
+	else
+		ata_id_string(args->id, &rbuf[32], ATA_ID_FW_REV + 2, 4);

So, this would change the behavior for devices which were reporting
stuff in ATA_ID_FW_REV.  Prolly no biggiee.

Yep, though many devices do pad with spaces so it won't change for
those. I did do a sanity check on both kinds to make sure it looked right.
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux