* [PATCH] libata: allow ->probe_reset to return ATA_DEV_UNKNOWN
@ 2006-02-12 6:01 Tejun Heo
2006-02-12 19:07 ` Jeff Garzik
0 siblings, 1 reply; 2+ messages in thread
From: Tejun Heo @ 2006-02-12 6:01 UTC (permalink / raw)
To: Jeff Garzik, linux-ide
[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>
Index: work1/drivers/scsi/libata-core.c
===================================================================
--- work1.orig/drivers/scsi/libata-core.c 2006-02-12 14:23:22.000000000 +0900
+++ work1/drivers/scsi/libata-core.c 2006-02-12 14:29:47.000000000 +0900
@@ -1142,8 +1142,11 @@ static int ata_bus_probe(struct ata_port
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);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-02-12 19:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-12 6:01 [PATCH] libata: allow ->probe_reset to return ATA_DEV_UNKNOWN Tejun Heo
2006-02-12 19:07 ` Jeff Garzik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).