diff options
-rw-r--r-- | drivers/pci/pcie/aspm.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c index be53d98fa384..71222814c1ec 100644 --- a/drivers/pci/pcie/aspm.c +++ b/drivers/pci/pcie/aspm.c | |||
@@ -588,11 +588,23 @@ void pcie_aspm_init_link_state(struct pci_dev *pdev) | |||
588 | * update through pcie_aspm_cap_init(). | 588 | * update through pcie_aspm_cap_init(). |
589 | */ | 589 | */ |
590 | pcie_aspm_cap_init(link, blacklist); | 590 | pcie_aspm_cap_init(link, blacklist); |
591 | pcie_config_aspm_path(link); | ||
592 | 591 | ||
593 | /* Setup initial Clock PM state */ | 592 | /* Setup initial Clock PM state */ |
594 | pcie_clkpm_cap_init(link, blacklist); | 593 | pcie_clkpm_cap_init(link, blacklist); |
595 | pcie_set_clkpm(link, policy_to_clkpm_state(link)); | 594 | |
595 | /* | ||
596 | * At this stage drivers haven't had an opportunity to change the | ||
597 | * link policy setting. Enabling ASPM on broken hardware can cripple | ||
598 | * it even before the driver has had a chance to disable ASPM, so | ||
599 | * default to a safe level right now. If we're enabling ASPM beyond | ||
600 | * the BIOS's expectation, we'll do so once pci_enable_device() is | ||
601 | * called. | ||
602 | */ | ||
603 | if (aspm_policy != POLICY_POWERSAVE) { | ||
604 | pcie_config_aspm_path(link); | ||
605 | pcie_set_clkpm(link, policy_to_clkpm_state(link)); | ||
606 | } | ||
607 | |||
596 | unlock: | 608 | unlock: |
597 | mutex_unlock(&aspm_lock); | 609 | mutex_unlock(&aspm_lock); |
598 | out: | 610 | out: |