Link to home
Start Free TrialLog in
Avatar of liaoo
liaoo

asked on

How to put the interface into Partial mode for AHCI via software ?

According to AHCI spec, software can initiate interface power management state transitions if the link layer is currently in the L_IDLE state.

8.3.1.2 System Software Initiated
PxCMD.ICC is used by system software to initiate interface power management state transitions. The request to transition to a different interface power management state shall only be acted on by the HBA if the Link layer is currently in the L_IDLE state. If the HBA’s Link layer is not in the L_IDLE state when the PxCMD.ICC field is written, the request shall be ignored. The HBA shall not perform a transition directly from Partial to Slumber or from Slumber to Partial based on a new value being written to PxCMD.ICC. If the link is currently in a Partial or Slumber interface power management state, it is software’s responsibility to bring the link to the active state before requesting a transition to a different interface power management state. The time from the request written to PxCMD.ICC until the link is active is bounded by the maximum recovery times from Partial or Slumber as outlined in the Serial ATA Revision 2.6 specification.

After reading involved document I summarize the steps as below trying to put the interface into the Partial state:

1) issue read/write commands to device first
2) after commands completed while loop to check if PxCMD.ICC = 0 or not
3) (... wait until PxCMD.ICC = 0 and this means the HBA is ready to to accept a new interface command...)
4) set PxCMD.ICC = 2(2 indicates "Partial" state)
5) wait for PxCMD.ICC back to "0" (spec said HBA will update this back to idle finally...)
6) while loop to check if PxSSTS.IPM = 2 (where 2 means: current interface is in Partial state)

The result was: PxSSTS is not equal to "2" for a long time and I guess the interface did not enter the partial state correctly...

@ In this configuration HBA registers CAP.SSC = PSC = 1 and I set PxSCTL.IPM = 0(no interface restrictions)

My questions are:

[1] Do I have to check if device support this transition ?  
[2] How to put into the Slumber state ?

Thanks !
ASKER CERTIFIED SOLUTION
Avatar of liaoo
liaoo

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial