Skip to content

Commit

Permalink
Merge branch 'pci/joe-aspm' into next
Browse files Browse the repository at this point in the history
* pci/joe-aspm:
  PCI/ASPM: Don't touch ASPM if forcibly disabled
  PCI/ASPM: Deallocate upstream link state even if device is not PCIe
  • Loading branch information
Bjorn Helgaas committed Feb 2, 2013
2 parents 8e5de3d + a26d5ec commit ecb87e6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/pci/pcie/aspm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit ecb87e6

Please sign in to comment.