[PATCH 0/2] Add external_port_map module parameter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello there,

This adds a module parameter 'external_port_map' to the 'ahci' driver.

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.

This module parameter gives those users a way to still have their ports
hotplug capable, without modifying the 'mobile_lpm_policy', which will
affect the LPM policy for all ports.

This module parameter allows you to just mark a single port as external,
such that you will still get power saving on the ports that are not marked
as external.


One example where this module parameter can also 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.

This module parameter will give 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, a kernel module is more convenient
compared to writing udev rules.


Kind regards,
Niklas


Niklas Cassel (2):
  ata: ahci: Create a ahci_get_port_map_helper() helper
  ata: ahci: Add external_port_map module parameter

 drivers/ata/ahci.c | 89 +++++++++++++++++++++++++++++++++++++---------
 1 file changed, 72 insertions(+), 17 deletions(-)

-- 
2.48.0





[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux