Hello there, This patch replaces an earlier patch proposal, which added an 'external_port_map' kernel module parameter to the ahci driver: https://lore.kernel.org/linux-ide/20250116143630.1935474-4-cassel@xxxxxxxxxx/ This patch instead adds support for 'external' to the existing libata.force kernel parameter. Normally we do not enable LPM on ports that are marked as external by firmware. However, as always, firmware can have bugs and can have forgotten to mark a port as external. One workaround for such buggy firmware would be to modify the 'mobile_lpm_policy' kernel module parameter, however, that will affect the LPM policy for all ports. This patch allows a user to mark one or more ports as hotplug capable (in case firmware has failed to do so). This way, you will still get LPM (power saving) on the ports that are not marked as external. One example where this can be used, is for buggy devices such as the "HL-DT-ST BD-RE BU40N" Blu-Ray player, which does not reply to a regular COMRESET (the controller sees nothing as connected), instead it will send a hotplug event when, and only when the user presses the tray open button. Not replying to a COMRESET is not spec compliant. If a port does not detect any device on a port, and LPM is enabled on that port, and the port is not marked as hotplug capable, then there should be no way that a device can be hotplugged later, so libata powers off the port/PHY to save power. Adding 'external' to libata.force gives users a way to handles such non spec compliant devices in a more fine grained way (rather than using the big 'mobile_lpm_policy' hammer). There does also exist a per port link_power_management_policy sysfs attribute, however, for many people, using libata.force (which can be either on the kernel command line, or as a kernel module parameter) is more convenient compared to writing udev rules. Kind regards, Niklas Niklas Cassel (1): ata: libata-core: Add 'external' to the libata.force kernel parameter .../admin-guide/kernel-parameters.txt | 2 + drivers/ata/libata-core.c | 38 +++++++++++++++++++ 2 files changed, 40 insertions(+) -- 2.48.1