diff options
author | Tejun Heo <htejun@gmail.com> | 2006-04-03 01:58:06 +0900 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-04-04 08:44:24 -0400 |
commit | c2a6585296009379e0f4eff39cdcb108b457ebf2 (patch) | |
tree | d6c123aca21e0e54a3b2a52c93f26b6352b068de /drivers/scsi | |
parent | 95de719adc94392a95c3c4d0a2d6b8b1ea39d236 (diff) | |
download | op-kernel-dev-c2a6585296009379e0f4eff39cdcb108b457ebf2.zip op-kernel-dev-c2a6585296009379e0f4eff39cdcb108b457ebf2.tar.gz |
[PATCH] ahci: do not fail softreset if PHY reports no device
All softreset methods are responsible for detecting device presence
and succeed softreset in such cases. AHCI didn't use to check for
device presence before proceeding with softreset and this caused
unnecessary reset retrials during probing. This patch adds presence
detection to AHCI softreset.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/ahci.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c index 0c5f0c8..ff48066 100644 --- a/drivers/scsi/ahci.c +++ b/drivers/scsi/ahci.c @@ -549,6 +549,12 @@ static int ahci_softreset(struct ata_port *ap, int verbose, unsigned int *class) DPRINTK("ENTER\n"); + if (!sata_dev_present(ap)) { + DPRINTK("PHY reports no device\n"); + *class = ATA_DEV_NONE; + return 0; + } + /* prepare for SRST (AHCI-1.1 10.4.1) */ rc = ahci_stop_engine(ap); if (rc) { |