aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlbert Lee <albertcc@tw.ibm.com>2007-06-05 01:01:33 -0400
committerJeff Garzik <jeff@garzik.org>2007-06-09 22:40:28 -0400
commitef143d577ba98c8a53aee9aa60e7d1f07c32fd7a (patch)
treecd80bb12a534850d6f28073247cad38bb05308ff
parent22888423b3b1b96573250671afb5b72ea4364902 (diff)
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: Albert Lee <albertcc@tw.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
-rw-r--r--drivers/ata/libata-core.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index c90c8e0fc49c..e7937166a8ba 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -1900,6 +1900,13 @@ int ata_dev_configure(struct ata_device *dev)
1900 if (ata_msg_probe(ap)) 1900 if (ata_msg_probe(ap))
1901 ata_dump_id(id); 1901 ata_dump_id(id);
1902 1902
1903 /* SCSI only uses 4-char revisions, dump full 8 chars from ATA */
1904 ata_id_c_string(dev->id, fwrevbuf, ATA_ID_FW_REV,
1905 sizeof(fwrevbuf));
1906
1907 ata_id_c_string(dev->id, modelbuf, ATA_ID_PROD,
1908 sizeof(modelbuf));
1909
1903 /* ATA-specific feature tests */ 1910 /* ATA-specific feature tests */
1904 if (dev->class == ATA_DEV_ATA) { 1911 if (dev->class == ATA_DEV_ATA) {
1905 if (ata_id_is_cfa(id)) { 1912 if (ata_id_is_cfa(id)) {
@@ -1914,13 +1921,6 @@ int ata_dev_configure(struct ata_device *dev)
1914 1921
1915 dev->n_sectors = ata_id_n_sectors(id); 1922 dev->n_sectors = ata_id_n_sectors(id);
1916 1923
1917 /* SCSI only uses 4-char revisions, dump full 8 chars from ATA */
1918 ata_id_c_string(dev->id, fwrevbuf, ATA_ID_FW_REV,
1919 sizeof(fwrevbuf));
1920
1921 ata_id_c_string(dev->id, modelbuf, ATA_ID_PROD,
1922 sizeof(modelbuf));
1923
1924 if (dev->id[59] & 0x100) 1924 if (dev->id[59] & 0x100)
1925 dev->multi_count = dev->id[59] & 0xff; 1925 dev->multi_count = dev->id[59] & 0xff;
1926 1926
@@ -2009,7 +2009,9 @@ int ata_dev_configure(struct ata_device *dev)
2009 2009
2010 /* print device info to dmesg */ 2010 /* print device info to dmesg */
2011 if (ata_msg_drv(ap) && print_info) 2011 if (ata_msg_drv(ap) && print_info)
2012 ata_dev_printk(dev, KERN_INFO, "ATAPI, max %s%s\n", 2012 ata_dev_printk(dev, KERN_INFO,
2013 "ATAPI: %s, %s, max %s%s\n",
2014 modelbuf, fwrevbuf,
2013 ata_mode_string(xfer_mask), 2015 ata_mode_string(xfer_mask),
2014 cdb_intr_string); 2016 cdb_intr_string);
2015 } 2017 }