PCI/ASPM: Disable L1 before configuring L1 Substates
authorBjorn Helgaas <bhelgaas@google.com>
Tue, 5 Mar 2024 21:15:25 +0000 (15:15 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 12 Mar 2024 17:09:11 +0000 (12:09 -0500)
commit64dbb2d707444f691539fb12aacf81797786c10b
tree1c8db6a59e1c466528413171717814af94fb862c
parentc198fafa0125e97728d16411aa653602900ab0bc
PCI/ASPM: Disable L1 before configuring L1 Substates

Per PCIe r6.1, sec 5.5.4, L1 must be disabled while setting ASPM L1 PM
Substates enable bits.  Previously this was enforced by clearing
PCI_EXP_LNKCTL_ASPMC before calling pci_restore_aspm_l1ss_state().

Move the L1 (and L0s, although that doesn't seem required) disable into
pci_restore_aspm_l1ss_state() itself so it's closer to the code that
depends on it.

Link: https://lore.kernel.org/r/20240223213733.GA115410@bhelgaas
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/pci.c
drivers/pci/pcie/aspm.c