Skip to content

Commit

Permalink
[PATCH] libata: fix missing classes[] initialization in ata_bus_probe()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed Mar 12, 2006
1 parent 75f554b commit 2061a47
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/scsi/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 2061a47

Please sign in to comment.