ATA Port Driver's Power Management
The ATA port driver enables the miniport driver to change the power state on an individual LUN or an individual channel. To change the power state of a LUN, the ATA port driver sends an IRB with a function value of IRB_FUNCTION_POWER_CHANGE to the device driver. The PowerChange member of the IRB indicates the current and target power states. To change the power state of the whole channel, the port driver calls the IdeHwControl miniport driver routine.
The miniport driver can begin a power state transition by calling AtaPortRequestPowerStateChange. A miniport driver might call this routine after, for example, a hot plug of an IDE device.
Doing idle detection from a miniport driver is strongly discouraged.