[PATCH] libata: fix ->phy_reset class code handling in ata_bus_probe()
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>
This commit is contained in:
parent
6cd727b14f
commit
f8c2c4202d
|
@ -1397,9 +1397,11 @@ static int ata_bus_probe(struct ata_port *ap)
|
||||||
} else {
|
} else {
|
||||||
ap->ops->phy_reset(ap);
|
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;
|
classes[i] = ap->device[i].class;
|
||||||
|
ap->device[i].class = ATA_DEV_UNKNOWN;
|
||||||
|
}
|
||||||
|
|
||||||
ata_port_probe(ap);
|
ata_port_probe(ap);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue