ahci: skip SRST for offline port
Skip SRST if phy is offline. It has been in libata-dev#upstream for quite some time but somehow didn't make into 2.6.17.
Signed-off-by Tejun Heo <[email protected]>
---
Jeff, after review, please forward to -stable. Thanks.
drivers/scsi/ahci.c +6 -0
@@ -548,6 +548,12 @@ static int ahci_softreset(struct ata_porDPRINTK ("ENTER\n" ); +if (!sata_dev_present (ap)) { + *class =ATA_DEV_NONE ; +DPRINTK ("EXIT, link offline\n" ); +return 0 ; + } +/* prepare for SRST (AHCI-1.1 10.4.1) */ rc =ahci_stop_engine (ap);if (rc) {