]> err.no Git - linux-2.6/commitdiff
[PATCH] libata: move IDENTIFY info printing from ata_dev_read_id() to ata_dev_configure()
authorTejun Heo <htejun@gmail.com>
Mon, 13 Mar 2006 10:51:19 +0000 (19:51 +0900)
committerJeff Garzik <jeff@garzik.org>
Fri, 17 Mar 2006 00:22:57 +0000 (19:22 -0500)
Move IDENTIFY info printing from ata_dev_read_id() to
ata_dev_configure() and print only if @print_info is non-zero.  This
kills duplicate IDENTIFY info printing during probing.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/scsi/libata-core.c

index 6fe41fb03929b6a355adf4775048f6d55120e519..714b42bad935739af2e3aef58b0856215c029c1b 100644 (file)
@@ -1120,12 +1120,6 @@ static int ata_dev_read_id(struct ata_port *ap, struct ata_device *dev,
 
        swap_buf_le16(id, ATA_ID_WORDS);
 
-       /* print device capabilities */
-       printk(KERN_DEBUG "ata%u: dev %u cfg "
-              "49:%04x 82:%04x 83:%04x 84:%04x 85:%04x 86:%04x 87:%04x 88:%04x\n",
-              ap->id, dev->devno,
-              id[49], id[82], id[83], id[84], id[85], id[86], id[87], id[88]);
-
        /* sanity check */
        if ((class == ATA_DEV_ATA) != ata_id_is_ata(id)) {
                rc = -EINVAL;
@@ -1205,6 +1199,13 @@ static int ata_dev_configure(struct ata_port *ap, struct ata_device *dev,
 
        DPRINTK("ENTER, host %u, dev %u\n", ap->id, dev->devno);
 
+       /* print device capabilities */
+       if (print_info)
+               printk(KERN_DEBUG "ata%u: dev %u cfg 49:%04x 82:%04x 83:%04x "
+                      "84:%04x 85:%04x 86:%04x 87:%04x 88:%04x\n",
+                      ap->id, dev->devno, id[49], id[82], id[83],
+                      id[84], id[85], id[86], id[87], id[88]);
+
        /* initialize to-be-configured parameters */
        dev->flags = 0;
        dev->max_sectors = 0;