From: Tejun Heo Date: Sun, 12 Feb 2006 06:01:49 +0000 (+0900) Subject: [PATCH] libata: allow ->probe_reset to return ATA_DEV_UNKNOWN X-Git-Tag: firefly_0821_release~37605^2~71 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=06ab78222bd119a0a3d8a1f89997ce902a219703;p=firefly-linux-kernel-4.4.55.git [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 Signed-off-by: Jeff Garzik --- diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index cef85e515c4c..9ddb568267e1 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);