Skip to content

Commit

Permalink
[PATCH] libata: disable failed devices only once in ata_bus_probe()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed Apr 11, 2006
1 parent 7dd29dd commit ec57375
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions drivers/scsi/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit ec57375

Please sign in to comment.