diff options
author | Tejun Heo <htejun@gmail.com> | 2006-03-11 10:57:39 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-03-11 19:04:49 -0500 |
commit | 2061a47a9b9530a9523e51167c996307db951c31 (patch) | |
tree | caf1ecb16e7030017fd14ea1f2f32b29b74090f3 /drivers/scsi/libata-core.c | |
parent | 75f554bc139461a5a926fad6a6fa90433a00a117 (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.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 5acb0798534c..5a0b67a602df 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) | |||
1346 | 1346 | ||
1347 | /* reset */ | 1347 | /* reset */ |
1348 | if (ap->ops->probe_reset) { | 1348 | if (ap->ops->probe_reset) { |
1349 | for (i = 0; i < ATA_MAX_DEVICES; i++) | ||
1350 | classes[i] = ATA_DEV_UNKNOWN; | ||
1351 | |||
1349 | rc = ap->ops->probe_reset(ap, classes); | 1352 | rc = ap->ops->probe_reset(ap, classes); |
1350 | if (rc) { | 1353 | if (rc) { |
1351 | printk("ata%u: reset failed (errno=%d)\n", ap->id, rc); | 1354 | printk("ata%u: reset failed (errno=%d)\n", ap->id, rc); |