aboutsummaryrefslogtreecommitdiff
path: root/drivers/scsi/libata-core.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2006-03-12 00:57:39 +0900
committerJeff Garzik <jeff@garzik.org>2006-03-11 19:04:49 -0500
commit2061a47a9b9530a9523e51167c996307db951c31 (patch)
treecaf1ecb16e7030017fd14ea1f2f32b29b74090f3 /drivers/scsi/libata-core.c
parent75f554bc139461a5a926fad6a6fa90433a00a117 (diff)
[PATCH] libata: fix missing classes[] initialization in ata_bus_probe()
ata_bus_probe() didn't initialize classes[] properly with ATA_DEV_UNKNOWN. As ->probe_reset() is allowed to leave @classes alone when no device is present, this results in garbage class values. ATM, the only affected driver is ata_piix. Signed-off-by: Tejun Heo <htejun@gmail.com> Cc: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/scsi/libata-core.c')
-rw-r--r--drivers/scsi/libata-core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index 5acb0798534..5a0b67a602d 100644
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -1346,6 +1346,9 @@ static int ata_bus_probe(struct ata_port *ap)
/* reset */
if (ap->ops->probe_reset) {
+ for (i = 0; i < ATA_MAX_DEVICES; i++)
+ classes[i] = ATA_DEV_UNKNOWN;
+
rc = ap->ops->probe_reset(ap, classes);
if (rc) {
printk("ata%u: reset failed (errno=%d)\n", ap->id, rc);