Skip to contentSkip to conversation

libata: PHY reset requires writing 0x4 to SControl

PATCH Applied Martin Hicks 3 participants 4 messages Jul 5, 2006 – Aug 10, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libata: PHY reset requires writing 0x4 to SControl

Hi,

Reading the Intel VSC and AHCI it seems like writing 0x302 is incorrect. The only valid values are 4, 1 and 0. Writing 4 disables the PHY.

---

 drivers/scsi/libata-core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

99377743755ef015100ab52fd79ee950a783141b

drivers/scsi/libata-core.c +1 -1
index 6c66877..577fbcc 100644
@@ -2705,7 +2705,7 @@ int sata_std_hardreset(struct ata_port *
 		if ((rc = sata_scr_read(ap, SCR_CONTROL, &scontrol)))
 			return rc;
 
-		scontrol = (scontrol & 0x0f0) | 0x302;
+		scontrol = (scontrol & 0x0f0) | 0x304;
 
 		if ((rc = sata_scr_write(ap, SCR_CONTROL, scontrol)))
 			return rc;
Signature · 1 line
1.3.2
#1 lore raw

Whoops. I should have pointed out that this is untested. Only the ahci and sata_nv use this function, I think. I don't have hardware for either.

mh

Quoted 35 lines · Martin Hicks

Hi,

Reading the Intel VSC and AHCI it seems like writing 0x302 is incorrect. The only valid values are 4, 1 and 0. Writing 4 disables the PHY.

---

 drivers/scsi/libata-core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

99377743755ef015100ab52fd79ee950a783141b

drivers/scsi/libata-core.c +1 -1
index 6c66877..577fbcc 100644
@@ -2705,7 +2705,7 @@ int sata_std_hardreset(struct ata_port *
 		if ((rc = sata_scr_read(ap, SCR_CONTROL, &scontrol)))
 			return rc;
 
-		scontrol = (scontrol & 0x0f0) | 0x302;
+		scontrol = (scontrol & 0x0f0) | 0x304;
 
 		if ((rc = sata_scr_write(ap, SCR_CONTROL, scontrol)))
 			return rc;
Signature · 6 lines
1.3.2

-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Signature · 1 line
Martin Hicks || [email protected] || PGP/GnuPG: 0x4C7F2BEE