aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2013-02-02 14:34:19 -0700
committerBjorn Helgaas <bhelgaas@google.com>2013-02-02 14:34:19 -0700
commitecb87e6609d3a559eacf7a61f5b4e088a797d07c (patch)
tree467eb9d56301a758a699fc6e1cb20de39248f76b /drivers/pci
parentMerge branch 'pci/yinghai-root-bus-hotplug' into next (diff)
parentPCI/ASPM: Don't touch ASPM if forcibly disabled (diff)
downloadlinux-dev-ecb87e6609d3a559eacf7a61f5b4e088a797d07c.tar.xz
linux-dev-ecb87e6609d3a559eacf7a61f5b4e088a797d07c.zip
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.c8
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)
struct pcie_link_state *link;
int blacklist = !!pcie_aspm_sanity_check(pdev);
+ if (!aspm_support_enabled)
+ return;
+
if (!pci_is_pcie(pdev) || pdev->link_state)
return;
if (pci_pcie_type(pdev) != PCI_EXP_TYPE_ROOT_PORT &&
@@ -634,10 +637,7 @@ void pcie_aspm_exit_link_state(struct pci_dev *pdev)
struct pci_dev *parent = pdev->bus->self;
struct pcie_link_state *link, *root, *parent_link;
- if (!pci_is_pcie(pdev) || !parent || !parent->link_state)
- return;
- if ((pci_pcie_type(parent) != PCI_EXP_TYPE_ROOT_PORT) &&
- (pci_pcie_type(parent) != PCI_EXP_TYPE_DOWNSTREAM))
+ if (!parent || !parent->link_state)
return;
down_read(&pci_bus_sem);