Commit ef143d57 authored by Albert Lee's avatar Albert Lee Committed by Jeff Garzik

libata: print device model and firmware revision for ATAPI devices

  For ATA/CFA devices, libata prints out the device model and firmware revision.
Do the same for ATAPI devices.
Signed-off-by: default avatarAlbert Lee <albertcc@tw.ibm.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent 22888423
...@@ -1900,6 +1900,13 @@ int ata_dev_configure(struct ata_device *dev) ...@@ -1900,6 +1900,13 @@ int ata_dev_configure(struct ata_device *dev)
if (ata_msg_probe(ap)) if (ata_msg_probe(ap))
ata_dump_id(id); ata_dump_id(id);
/* SCSI only uses 4-char revisions, dump full 8 chars from ATA */
ata_id_c_string(dev->id, fwrevbuf, ATA_ID_FW_REV,
sizeof(fwrevbuf));
ata_id_c_string(dev->id, modelbuf, ATA_ID_PROD,
sizeof(modelbuf));
/* ATA-specific feature tests */ /* ATA-specific feature tests */
if (dev->class == ATA_DEV_ATA) { if (dev->class == ATA_DEV_ATA) {
if (ata_id_is_cfa(id)) { if (ata_id_is_cfa(id)) {
...@@ -1914,13 +1921,6 @@ int ata_dev_configure(struct ata_device *dev) ...@@ -1914,13 +1921,6 @@ int ata_dev_configure(struct ata_device *dev)
dev->n_sectors = ata_id_n_sectors(id); dev->n_sectors = ata_id_n_sectors(id);
/* SCSI only uses 4-char revisions, dump full 8 chars from ATA */
ata_id_c_string(dev->id, fwrevbuf, ATA_ID_FW_REV,
sizeof(fwrevbuf));
ata_id_c_string(dev->id, modelbuf, ATA_ID_PROD,
sizeof(modelbuf));
if (dev->id[59] & 0x100) if (dev->id[59] & 0x100)
dev->multi_count = dev->id[59] & 0xff; dev->multi_count = dev->id[59] & 0xff;
...@@ -2009,7 +2009,9 @@ int ata_dev_configure(struct ata_device *dev) ...@@ -2009,7 +2009,9 @@ int ata_dev_configure(struct ata_device *dev)
/* print device info to dmesg */ /* print device info to dmesg */
if (ata_msg_drv(ap) && print_info) if (ata_msg_drv(ap) && print_info)
ata_dev_printk(dev, KERN_INFO, "ATAPI, max %s%s\n", ata_dev_printk(dev, KERN_INFO,
"ATAPI: %s, %s, max %s%s\n",
modelbuf, fwrevbuf,
ata_mode_string(xfer_mask), ata_mode_string(xfer_mask),
cdb_intr_string); cdb_intr_string);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment