]> pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] libata: disable failed devices only once in ata_bus_probe()
authorTejun Heo <htejun@gmail.com>
Tue, 11 Apr 2006 13:26:29 +0000 (22:26 +0900)
committerJeff Garzik <jeff@garzik.org>
Tue, 11 Apr 2006 17:22:17 +0000 (13:22 -0400)
Devices which consumed all their changes used to be disabled every
iteration.  This causes unnecessary noise in the console output.
Disable once and leave alone.

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

index 0075fe7404d5a735c28018a868b794da6dc92998..9194e4a6a55a74fea63ae6f93cd368b74abfd5fd 100644 (file)
@@ -1411,12 +1411,9 @@ static int ata_bus_probe(struct ata_port *ap)
        /* read IDENTIFY page and configure devices */
        for (i = 0; i < ATA_MAX_DEVICES; i++) {
                dev = &ap->device[i];
-               dev->class = classes[i];
 
-               if (!tries[i]) {
-                       ata_down_xfermask_limit(ap, dev, 1);
-                       ata_dev_disable(ap, dev);
-               }
+               if (tries[i])
+                       dev->class = classes[i];
 
                if (!ata_dev_enabled(dev))
                        continue;
@@ -1477,6 +1474,11 @@ static int ata_bus_probe(struct ata_port *ap)
                        tries[dev->devno] = 0;
        }
 
+       if (!tries[dev->devno]) {
+               ata_down_xfermask_limit(ap, dev, 1);
+               ata_dev_disable(ap, dev);
+       }
+
        goto retry;
 }