Skip to contentSkip to conversation

] PCI/ASPM: Do not initialize link state when aspm_disabled is set

PATCH Applied Patrick Talbert 2 participants 2 messages Sep 5, 2018 – Sep 19, 2018 PCI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ] PCI/ASPM: Do not initialize link state when aspm_disabled is set

Now that ASPM is configured for *all* PCIE devices at boot, a problem is seen with systems that set the FADT NO_ASPM bit. This bit indicates that the OS should not alter the ASPM state, but when pcie_aspm_init_link_state() runs it only checks for !aspm_support_enabled. This misses the ACPI_FADT_NO_ASPM case because that is setting aspm_disabled.

The result is systems may hang at boot after 1302fcf; avoidable if they boot with pcie_aspm=off (sets !aspm_support_enabled).

Fix this by having aspm_init_link_state() check for either !aspm_support_enabled or acpm_disabled.

Fixes 1302fcf ("PCI: Configure *all* devices, not just hot-added ones")
---
 drivers/pci/pcie/aspm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/pcie/aspm.c +1 -1
index 53269167..4feb8ba 100644
@@ -895,7 +895,7 @@ void pcie_aspm_init_link_state(struct pci_dev *pdev)
 	struct pcie_link_state *link;
 	int blacklist = !!pcie_aspm_sanity_check(pdev);
 
-	if (!aspm_support_enabled)
+	if (!aspm_support_enabled || aspm_disabled)
 		return;
 
 	if (pdev->link_state)
Signature · 1 line
1.8.3.1
#1 lore raw
Quoted 9 lines · Patrick Talbert

Now that ASPM is configured for *all* PCIE devices at boot, a problem is seen with systems that set the FADT NO_ASPM bit. This bit indicates that the OS should not alter the ASPM state, but when pcie_aspm_init_link_state() runs it only checks for !aspm_support_enabled. This misses the ACPI_FADT_NO_ASPM case because that is setting aspm_disabled.

The result is systems may hang at boot after 1302fcf; avoidable if they boot with pcie_aspm=off (sets !aspm_support_enabled).

Quoted 6 lines

Fix this by having aspm_init_link_state() check for either !aspm_support_enabled or acpm_disabled.

Fixes 1302fcf ("PCI: Configure *all* devices, not just hot-added ones")

Applied to pci/aspm for v4.20, thanks!

Quoted 20 lines
---
 drivers/pci/pcie/aspm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/pcie/aspm.c +1 -1
index 53269167..4feb8ba 100644
@@ -895,7 +895,7 @@ void pcie_aspm_init_link_state(struct pci_dev *pdev)
 	struct pcie_link_state *link;
 	int blacklist = !!pcie_aspm_sanity_check(pdev);
 
-	if (!aspm_support_enabled)
+	if (!aspm_support_enabled || aspm_disabled)
 		return;
 
 	if (pdev->link_state)
Signature · 1 line
1.8.3.1