diff options
author | Damien Le Moal <dlemoal@kernel.org> | 2025-07-01 21:53:18 +0900 |
---|---|---|
committer | Niklas Cassel <cassel@kernel.org> | 2025-07-02 12:01:33 +0200 |
commit | 4edf1505b76d30e1e1e283d431e4f84ad01ddcef (patch) | |
tree | 13e5e0a30a552891d635fe9667f9a47eeada731a /scripts/lib/kdoc/kdoc_re.py | |
parent | f7870e8d345cdabfb94bcbdcba6a07e050f8705e (diff) |
ata: ahci: Disallow LPM policy control for external ports
Commit ae1f3db006b7 ("ata: ahci: do not enable LPM on external ports")
added an early return in ahci_update_initial_lpm_policy() for all
ports flagged as external with the ATA_PFLAG_EXTERNAL port flag (e.g.
eSATA ports or hotplug capable ports) so that the target_lpm_policy of
these ports is unchanged and set to ATA_LPM_UNKNOWN. thus forcing libata
EH to not be called for external port. The goal of this change is to
preserve the initial power management policy to not break the hotplug
capability of external ports.
However, this change is incomplete as users or system daemon (e.g.
systemd-udevd) can still apply the system preferred power management
policy through sysfs, thus potentially unknowingly breaking the port
hotplug capability.
Modify ahci_update_initial_lpm_policy() to flag external ports with
ATA_FLAG_NO_LPM to prevent changes to the LPM policy by users through
the sysfs link_power_management_policy host attribute. Also set the
target_lpm_policy of external ports to ATA_LPM_MAX_POWER to ensure
that the port is not in a low power state preventing hotplug operations.
Since commit 439d47608bb3 ("ata: libata: Print if port is external on
boot") introduced an unconditional print on port probe signaling that a
port is external, the debug message signaling that fact and that LPM
will not be enabled is removed.
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Niklas Cassel <cassel@kernel.org>
Link: https://lore.kernel.org/r/20250701125321.69496-8-dlemoal@kernel.org
Signed-off-by: Niklas Cassel <cassel@kernel.org>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_re.py')
0 files changed, 0 insertions, 0 deletions