提交 fe9c1d01 编写于 作者: P Patrick Talbert 提交者: Xie XiuQi

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

mainline inclusion
from mainline-4.20
commit 17c91487364f
category: bugfix
bugzilla: 6314
CVE: NA

-------------------------------------------------

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 1302fcf0; 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.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=201001
Fixes: 1302fcf0 ("PCI: Configure *all* devices, not just hot-added ones")
Signed-off-by: NPatrick Talbert <ptalbert@redhat.com>
Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
Signed-off-by: NHanjun Guo <guohanjun@huawei.com>
Reviewed-by: NXiongfeng Wang <wangxiongfeng2@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 d3b52881
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册