mbox series

[v6,0/4] PCI/ASPM: Add sysfs attributes for controlling ASPM

Message ID 0577b966-6290-0685-123d-c675baf97caa@gmail.com (mailing list archive)
Headers show
Series PCI/ASPM: Add sysfs attributes for controlling ASPM | expand

Message

Heiner Kallweit Oct. 1, 2019, 7:15 p.m. UTC
Background of this extension is a problem with the r8169 network driver.
Several combinations of board chipsets and network chip versions have
problems if ASPM is enabled, therefore we have to disable ASPM per
default. However especially on notebooks ASPM can provide significant
power-saving, therefore we want to give users the option to enable
ASPM. With the new sysfs attributes users can control which ASPM
link-states are disabled.

Note: Series depends on series "PCI: Make pcie_downstream_port()
available outside of access.c" from Mika Westerberg that is still
sitting in the PCI inbox. 
Alternatively I could prepare a version w/o this dependency, but
then Mika's series would need to be changed.

v2:
- use a dedicated sysfs attribute per link state
- allow separate control of ASPM and PCI PM L1 sub-states

v3:
- patch 3: statically allocate the attribute group
- patch 3: replace snprintf with printf
- add patch 4

v4:
- patch 3: add call to sysfs_update_group because is_visible callback
           returns false always at file creation time
- patch 3: simplify code a little

v5:
- rebased to latest pci/next

v6:
- patch 3: consider several review comments from Bjorn
- patch 4: add discussion link to commit message

Heiner Kallweit (4):
  PCI/ASPM: Add L1 PM Substate support to pci_disable_link_state
  PCI/ASPM: Allow to re-enable Clock PM
  PCI/ASPM: Add sysfs attributes for controlling ASPM link states
  PCI/ASPM: Remove Kconfig option PCIEASPM_DEBUG and related code

 Documentation/ABI/testing/sysfs-bus-pci |  14 ++
 drivers/pci/pci-sysfs.c                 |  10 +-
 drivers/pci/pci.h                       |  12 +-
 drivers/pci/pcie/Kconfig                |   7 -
 drivers/pci/pcie/aspm.c                 | 246 +++++++++++++++++-------
 include/linux/pci.h                     |  10 +-
 6 files changed, 206 insertions(+), 93 deletions(-)