diff options
author | Tejun Heo <htejun@gmail.com> | 2006-02-12 15:01:49 +0900 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2006-02-12 13:57:22 -0500 |
commit | 06ab78222bd119a0a3d8a1f89997ce902a219703 (patch) | |
tree | 21c466084f2a1d9bc3bc326e484619ad002dc08b /drivers/scsi | |
parent | bef4a456b8dc8b3638f4d49a25a89e1467da9483 (diff) |
[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: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/libata-core.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index cef85e515c4..9ddb568267e 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c @@ -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); |