• Srinivas Pandruvada's avatar
    ata: ahci: Enable DEVSLP by default on x86 with SLP_S0 · b1a9585c
    Srinivas Pandruvada authored
    One of the requirement for modern x86 system to enter lowest power mode
    (SLP_S0) is SATA IP block to be off. This is true even during when
    platform is suspended to idle and not only in opportunistic (runtime)
    suspend.
    
    Several of these system don't have traditional ACPI S3, so it is
    important that they enter SLP_S0 state, to avoid draining battery even
    during suspend. So it is important that out of the box Linux installation
    reach this state.
    
    SATA IP block doesn't get turned off till SATA is in DEVSLP mode. Here
    user has to either use scsi-host sysfs or tools like powertop to set
    the sata-host link_power_management_policy to min_power.
    
    This change sets by default link power management policy to min_power
    with partial (preferred) or slumber support on idle for some platforms.
    
    To avoid regressions, the following conditions are used:
    - User didn't override the policy from module parameter
    - The kernel config is already set to use med_power_with_dipm or deeper
    - System is a SLP_S0 capable using ACPI low power idle flag
    This combination will make sure that systems are fairly recent and
    since getting shipped with SLP_S0 support, the DEVSLP function
    is already validated.
    Signed-off-by: default avatarSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
    Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    b1a9585c
ahci.c 59.2 KB