Skip to content

Commit

Permalink
[PATCH] ahci: hardreset classification fix
Browse files Browse the repository at this point in the history
AHCI calls ata_dev_classify() even when no device is attached which
results in false class code.  Fix it.

Signed-off-by: Tejun Heo <htejun@gmail.com>
  • Loading branch information
Tejun Heo committed May 15, 2006
1 parent 3c567b7 commit e4fac92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/ahci.c
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ static int ahci_hardreset(struct ata_port *ap, unsigned int *class)
rc = sata_std_hardreset(ap, class);
ahci_start_engine(ap);

if (rc == 0)
if (rc == 0 && sata_dev_present(ap))
*class = ahci_dev_classify(ap);
if (*class == ATA_DEV_UNKNOWN)
*class = ATA_DEV_NONE;
Expand Down

0 comments on commit e4fac92

Please sign in to comment.