libata: PHY reset requires writing 0x4 to SControl
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
@@ -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
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
0x302is incorrect. The only valid values are 4, 1 and 0. Writing 4 disables the PHY.Signed-off-by Martin Hicks <[email protected]>---
drivers/scsi/libata-core.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
99377743755ef015100ab52fd79ee950a783141bdrivers/scsi/libata-core.c +1
-1@@ -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
Quoted 7 lines · Martin Hicks
Hi,
Reading the Intel VSC and AHCI it seems like writing
0x302is incorrect. The only valid values are 4, 1 and 0. Writing 4 disables the PHY.Signed-off-by Martin Hicks <[email protected]>
Thanks for spotting this.
Signature · 1 line
tejun
Jeff Garzik
Appliedapplied