diff options
author | Tejun Heo <htejun@gmail.com> | 2006-05-15 07:57:30 -0400 |
---|---|---|
committer | Tejun Heo <htejun@gmail.com> | 2006-05-15 07:57:30 -0400 |
commit | f8c2c4202d86e14ca03b7adc7ebcb30fc74b24e1 (patch) | |
tree | acd1428c4cf8f6b2370db54f368309143774e72a | |
parent | 6cd727b14f1a6cdcb088d1067c1ba0ba124806a7 (diff) |
[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>
-rw-r--r-- | drivers/scsi/libata-core.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 85a004290072..1669dae53ce3 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c | |||
@@ -1397,9 +1397,11 @@ static int ata_bus_probe(struct ata_port *ap) | |||
1397 | } else { | 1397 | } else { |
1398 | ap->ops->phy_reset(ap); | 1398 | ap->ops->phy_reset(ap); |
1399 | 1399 | ||
1400 | if (!(ap->flags & ATA_FLAG_DISABLED)) | 1400 | for (i = 0; i < ATA_MAX_DEVICES; i++) { |
1401 | for (i = 0; i < ATA_MAX_DEVICES; i++) | 1401 | if (!(ap->flags & ATA_FLAG_DISABLED)) |
1402 | classes[i] = ap->device[i].class; | 1402 | classes[i] = ap->device[i].class; |
1403 | ap->device[i].class = ATA_DEV_UNKNOWN; | ||
1404 | } | ||
1403 | 1405 | ||
1404 | ata_port_probe(ap); | 1406 | ata_port_probe(ap); |
1405 | } | 1407 | } |