Commit 06ab7822 authored by Tejun Heo's avatar Tejun Heo Committed by Jeff Garzik

[PATCH] libata: allow ->probe_reset to return ATA_DEV_UNKNOWN

This patch makes ata_bus_probe() normalize classes[] returned by
->probe_reset such that ->probe_reset can return ATA_DEV_UNKNOWN.
This eases implementation of ->probe_reset's which don't directly use
ata_drive_probe_reset().
Signed-off-by: default avatarTejun Heo <htejun@gmail.com>
Signed-off-by: default avatarJeff Garzik <jgarzik@pobox.com>
parent bef4a456
...@@ -1142,8 +1142,11 @@ static int ata_bus_probe(struct ata_port *ap) ...@@ -1142,8 +1142,11 @@ static int ata_bus_probe(struct ata_port *ap)
rc = ap->ops->probe_reset(ap, classes); rc = ap->ops->probe_reset(ap, classes);
if (rc == 0) { if (rc == 0) {
for (i = 0; i < ATA_MAX_DEVICES; i++) for (i = 0; i < ATA_MAX_DEVICES; i++) {
if (classes[i] == ATA_DEV_UNKNOWN)
classes[i] = ATA_DEV_NONE;
ap->device[i].class = classes[i]; ap->device[i].class = classes[i];
}
} else { } else {
printk(KERN_ERR "ata%u: probe reset failed, " printk(KERN_ERR "ata%u: probe reset failed, "
"disabling port\n", ap->id); "disabling port\n", ap->id);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment