[PATCH-stable] ahci: skip SRST for offline port

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <htejun@xxxxxxxxx>
---
Jeff, after review, please forward to -stable.  Thanks.

diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c
index b4f8fb1..1b01c4d 100644
--- a/drivers/scsi/ahci.c
+++ b/drivers/scsi/ahci.c
@@ -548,6 +548,12 @@ static int ahci_softreset(struct ata_por
 
 	DPRINTK("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) {
-
: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux