diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2013-02-02 16:34:19 -0500 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2013-02-02 16:34:19 -0500 |
commit | ecb87e6609d3a559eacf7a61f5b4e088a797d07c (patch) | |
tree | 467eb9d56301a758a699fc6e1cb20de39248f76b /drivers/pci | |
parent | 8e5de3dcc6bde513d0e3940ae317b85972f3de5a (diff) | |
parent | a26d5ecb3201c11e03663a8f4a7dedc0c5f85c07 (diff) |
Merge branch 'pci/joe-aspm' into next
* pci/joe-aspm:
PCI/ASPM: Don't touch ASPM if forcibly disabled
PCI/ASPM: Deallocate upstream link state even if device is not PCIe
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/pcie/aspm.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c index b52630b8eada..e8a19772cf52 100644 --- a/drivers/pci/pcie/aspm.c +++ b/drivers/pci/pcie/aspm.c | |||
@@ -556,6 +556,9 @@ void pcie_aspm_init_link_state(struct pci_dev *pdev) | |||
556 | struct pcie_link_state *link; | 556 | struct pcie_link_state *link; |
557 | int blacklist = !!pcie_aspm_sanity_check(pdev); | 557 | int blacklist = !!pcie_aspm_sanity_check(pdev); |
558 | 558 | ||
559 | if (!aspm_support_enabled) | ||
560 | return; | ||
561 | |||
559 | if (!pci_is_pcie(pdev) || pdev->link_state) | 562 | if (!pci_is_pcie(pdev) || pdev->link_state) |
560 | return; | 563 | return; |
561 | if (pci_pcie_type(pdev) != PCI_EXP_TYPE_ROOT_PORT && | 564 | if (pci_pcie_type(pdev) != PCI_EXP_TYPE_ROOT_PORT && |
@@ -634,10 +637,7 @@ void pcie_aspm_exit_link_state(struct pci_dev *pdev) | |||
634 | struct pci_dev *parent = pdev->bus->self; | 637 | struct pci_dev *parent = pdev->bus->self; |
635 | struct pcie_link_state *link, *root, *parent_link; | 638 | struct pcie_link_state *link, *root, *parent_link; |
636 | 639 | ||
637 | if (!pci_is_pcie(pdev) || !parent || !parent->link_state) | 640 | if (!parent || !parent->link_state) |
638 | return; | ||
639 | if ((pci_pcie_type(parent) != PCI_EXP_TYPE_ROOT_PORT) && | ||
640 | (pci_pcie_type(parent) != PCI_EXP_TYPE_DOWNSTREAM)) | ||
641 | return; | 641 | return; |
642 | 642 | ||
643 | down_read(&pci_bus_sem); | 643 | down_read(&pci_bus_sem); |