pci: fix a panic in pcie_aspm_init_link_state
PATCH 1/1 pci: fix a panic in pcie_aspm_init_link_state
My desktop always painc in pcie_aspm_init_link_state. Looks commit 4949be16822e92 causes it. The FADT declaims the system doesn't support ASPM. Below patch fixes the painc for me. I'm quite strange we still touch aspm registers even aspm_disabled.
drivers/pci/pcie/aspm.c +5 -4
@@ -500,9 +500,6 @@ static int pcie_aspm_sanity_check(struct pci_dev *pdev)int pos;u32 reg32; -if (aspm_disabled) -return 0 ; -/* * Some functions in a slot might not all be PCIe functions, * very strange. Disable ASPM for the whole slot
@@ -566,7 +563,11 @@ static struct pcie_link_state *alloc_pcie_link_state(struct pci_dev *pdev)void pcie_aspm_init_link_state (struct pci_dev *pdev) {struct pcie_link_state *link; -int blacklist = !!pcie_aspm_sanity_check (pdev); +int blacklist; + +if (aspm_disabled) +return ; + blacklist = !!pcie_aspm_sanity_check (pdev);if (!pci_is_pcie (pdev) || pdev->link_state)return ;
Quoted 5 lines · Shaohua Li
My desktop always painc in
pcie_aspm_init_link_state. Looks commit4949be16822e92causes it. The FADT declaims the system doesn't support ASPM. Below patch fixes the painc for me. I'm quite strange we still touch aspm registers evenaspm_disabled.
If the device gives us ASPM control via _OSC and the FADT indicates that the system doesn't support ASPM, we want to clear the ASPM state - so we can't simply disable ASPM in that case. Can you get the actual backtrace?
Signature · 1 line
Matthew Garrett | [email protected]