ata_bus_probe() doesn't clear dev->class after ->phy_reset(). This
can result in falsely enabled devices if probing fails. Clear
dev->class to ATA_DEV_UNKNOWN after fetching it.
Signed-off-by: Tejun Heo <htejun@gmail.com>
} else {
ap->ops->phy_reset(ap);
- if (!(ap->flags & ATA_FLAG_DISABLED))
- for (i = 0; i < ATA_MAX_DEVICES; i++)
+ for (i = 0; i < ATA_MAX_DEVICES; i++) {
+ if (!(ap->flags & ATA_FLAG_DISABLED))
classes[i] = ap->device[i].class;
+ ap->device[i].class = ATA_DEV_UNKNOWN;
+ }
ata_port_probe(ap);
}