提交 ec573755 编写于 作者: T Tejun Heo 提交者: Jeff Garzik

[PATCH] libata: disable failed devices only once in ata_bus_probe()

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: NTejun Heo <htejun@gmail.com>
Signed-off-by: NJeff Garzik <jeff@garzik.org>
上级 7dd29dd6
...@@ -1411,12 +1411,9 @@ static int ata_bus_probe(struct ata_port *ap) ...@@ -1411,12 +1411,9 @@ static int ata_bus_probe(struct ata_port *ap)
/* read IDENTIFY page and configure devices */ /* read IDENTIFY page and configure devices */
for (i = 0; i < ATA_MAX_DEVICES; i++) { for (i = 0; i < ATA_MAX_DEVICES; i++) {
dev = &ap->device[i]; dev = &ap->device[i];
dev->class = classes[i];
if (!tries[i]) { if (tries[i])
ata_down_xfermask_limit(ap, dev, 1); dev->class = classes[i];
ata_dev_disable(ap, dev);
}
if (!ata_dev_enabled(dev)) if (!ata_dev_enabled(dev))
continue; continue;
...@@ -1477,6 +1474,11 @@ static int ata_bus_probe(struct ata_port *ap) ...@@ -1477,6 +1474,11 @@ static int ata_bus_probe(struct ata_port *ap)
tries[dev->devno] = 0; tries[dev->devno] = 0;
} }
if (!tries[dev->devno]) {
ata_down_xfermask_limit(ap, dev, 1);
ata_dev_disable(ap, dev);
}
goto retry; goto retry;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册