Skip to content

Commit

Permalink
[PATCH] libata: allow ->probe_reset to return ATA_DEV_UNKNOWN
Browse files Browse the repository at this point in the history
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: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed Feb 12, 2006
1 parent bef4a45 commit 06ab782
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/scsi/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1142,8 +1142,11 @@ static int ata_bus_probe(struct ata_port *ap)

rc = ap->ops->probe_reset(ap, classes);
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];
}
} else {
printk(KERN_ERR "ata%u: probe reset failed, "
"disabling port\n", ap->id);
Expand Down

0 comments on commit 06ab782

Please sign in to comment.