PCI/ASPM: Remove pcie_aspm_pm_state_change()
authorKai-Heng Feng <kai.heng.feng@canonical.com>
Mon, 11 Jul 2022 23:07:01 +0000 (18:07 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 12 Jul 2022 15:08:26 +0000 (10:08 -0500)
commit08d0cc5f34265d1a1e3031f319f594bd1970976c
tree53ca00eb37db11a2c3c719b388500652ecb22393
parentf2906aa863381afb0015a9eb7fefad885d4e5a56
PCI/ASPM: Remove pcie_aspm_pm_state_change()

pcie_aspm_pm_state_change() was introduced at the inception of PCIe ASPM
code, but it can cause some issues. For instance, when ASPM config is
changed via sysfs, those changes won't persist across power state change
because pcie_aspm_pm_state_change() overwrites them.

Also, if the driver restores L1SS [1] after system resume, the restored
state will also be overwritten by pcie_aspm_pm_state_change().

Remove pcie_aspm_pm_state_change().  If there's any hardware that really
needs it to function, a quirk can be used instead.

[1] https://lore.kernel.org/linux-pci/20220201123536.12962-1-vidyas@nvidia.com/
Link: https://lore.kernel.org/r/20220509073639.2048236-1-kai.heng.feng@canonical.com
[bhelgaas: remove additional pcie_aspm_pm_state_change() call in
pci_set_low_power_state(), added by
10aa5377fc8a ("PCI/PM: Split pci_raw_set_power_state()") and moved by
7957d201456f ("PCI/PM: Relocate pci_set_low_power_state()")]
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/pci.c
drivers/pci/pci.h
drivers/pci/pcie/aspm.c