Skip to content

Commit

Permalink
[PATCH] libata: fix ->phy_reset class code handling in ata_bus_probe()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tejun Heo committed May 15, 2006
1 parent 6cd727b commit f8c2c42
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/scsi/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1397,9 +1397,11 @@ static int ata_bus_probe(struct ata_port *ap)
} 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);
}
Expand Down

0 comments on commit f8c2c42

Please sign in to comment.