[libata] SCSI->ATA simulator hacking: INQUIRY command
The SCSI T10 committee is working on a document describing a standard method for translating ATA<->SCSI, since it being done quite often these days. Some of the recommendations are reasonable, and we implement two here: * Mirror that ATA 'removeable media' bit into INQUIRY output. * Change behavior of INQUIRY output field 'product revision' from the libata software version number to the first 4 bytes of the ATA device's firmware revision number. Rather than cache the firmware revision in struct ata_device, as was/is done with two other strings, I took the opportunity to eliminate the caching of the two other strings, 'vendor' and 'product'. These strings are now retrieved as needed from the IDENTIFY [PACKET] DEVICE info page, since we cache its entire contents. Retrieving a string from the identify-device page is done via the helper function ata_dev_id_string(), which is now exported. This patch winds up making struct ata_device 40 bytes smaller, and the libata core gets a bit smaller as well.
Showing
Please register or sign in to comment