* [[v1]] PCI/ASPM: Do not initialize link state when aspm_disabled is set
@ 2018-09-05 7:12 Patrick Talbert
2018-09-18 21:21 ` Bjorn Helgaas
0 siblings, 1 reply; 2+ messages in thread
From: Patrick Talbert @ 2018-09-05 7:12 UTC (permalink / raw)
To: linux-pci; +Cc: helgaas
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")
Link: https://bugzilla.kernel.org/show_bug.cgi?id=201001
Signed-off-by: Patrick Talbert <ptalbert@redhat.com>
---
drivers/pci/pcie/aspm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c
index 53269167..4feb8ba 100644
--- a/drivers/pci/pcie/aspm.c
+++ b/drivers/pci/pcie/aspm.c
@@ -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)
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [[v1]] PCI/ASPM: Do not initialize link state when aspm_disabled is set
2018-09-05 7:12 [[v1]] PCI/ASPM: Do not initialize link state when aspm_disabled is set Patrick Talbert
@ 2018-09-18 21:21 ` Bjorn Helgaas
0 siblings, 0 replies; 2+ messages in thread
From: Bjorn Helgaas @ 2018-09-18 21:21 UTC (permalink / raw)
To: Patrick Talbert; +Cc: linux-pci
On Wed, Sep 05, 2018 at 09:12:53AM +0200, Patrick Talbert wrote:
> 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")
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=201001
> Signed-off-by: Patrick Talbert <ptalbert@redhat.com>
Applied to pci/aspm for v4.20, thanks!
> ---
> drivers/pci/pcie/aspm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c
> index 53269167..4feb8ba 100644
> --- a/drivers/pci/pcie/aspm.c
> +++ b/drivers/pci/pcie/aspm.c
> @@ -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)
> --
> 1.8.3.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-09-19 2:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-05 7:12 [[v1]] PCI/ASPM: Do not initialize link state when aspm_disabled is set Patrick Talbert
2018-09-18 21:21 ` Bjorn Helgaas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).