Skip to contentSkip to conversation

ahci: skip SRST for offline port

PATCH-stable Tejun Heo 1 participant 1 message Jun 28, 2006

Subsystems (2)
lore
Share & tools
lore

Tejun Heo

author
#0 lore raw

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.

---
Jeff, after review, please forward to -stable. Thanks.

drivers/scsi/ahci.c +6 -0
index b4f8fb1..1b01c4d 100644
@@ -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) {