According to AHCI spec, software can initiate
interface power management state transitions if the link layer is currently in the L_IDLE state.
184.108.40.206 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:
issue read/write commands to device first
after commands completed while loop to check if PxCMD.ICC = 0 or not
(... wait until PxCMD.ICC = 0 and this means the HBA is ready to to accept a new interface command...)
set PxCMD.ICC = 2(2 indicates "Partial" state)
wait for PxCMD.ICC back to "0" (spec said HBA will update this back to idle finally...)
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:
 Do I have to check if device support this transition ?
 How to put into the Slumber state ?