diff options
Diffstat (limited to 'drivers/pci/pcie/aspm.c')
-rw-r--r-- | drivers/pci/pcie/aspm.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c index 1cfbf228fbb1..b500840a143b 100644 --- a/drivers/pci/pcie/aspm.c +++ b/drivers/pci/pcie/aspm.c | |||
@@ -76,7 +76,15 @@ static LIST_HEAD(link_list); | |||
76 | #define POLICY_DEFAULT 0 /* BIOS default setting */ | 76 | #define POLICY_DEFAULT 0 /* BIOS default setting */ |
77 | #define POLICY_PERFORMANCE 1 /* high performance */ | 77 | #define POLICY_PERFORMANCE 1 /* high performance */ |
78 | #define POLICY_POWERSAVE 2 /* high power saving */ | 78 | #define POLICY_POWERSAVE 2 /* high power saving */ |
79 | |||
80 | #ifdef CONFIG_PCIEASPM_PERFORMANCE | ||
81 | static int aspm_policy = POLICY_PERFORMANCE; | ||
82 | #elif defined CONFIG_PCIEASPM_POWERSAVE | ||
83 | static int aspm_policy = POLICY_POWERSAVE; | ||
84 | #else | ||
79 | static int aspm_policy; | 85 | static int aspm_policy; |
86 | #endif | ||
87 | |||
80 | static const char *policy_str[] = { | 88 | static const char *policy_str[] = { |
81 | [POLICY_DEFAULT] = "default", | 89 | [POLICY_DEFAULT] = "default", |
82 | [POLICY_PERFORMANCE] = "performance", | 90 | [POLICY_PERFORMANCE] = "performance", |
@@ -508,6 +516,16 @@ static int pcie_aspm_sanity_check(struct pci_dev *pdev) | |||
508 | pos = pci_pcie_cap(child); | 516 | pos = pci_pcie_cap(child); |
509 | if (!pos) | 517 | if (!pos) |
510 | return -EINVAL; | 518 | return -EINVAL; |
519 | |||
520 | /* | ||
521 | * If ASPM is disabled then we're not going to change | ||
522 | * the BIOS state. It's safe to continue even if it's a | ||
523 | * pre-1.1 device | ||
524 | */ | ||
525 | |||
526 | if (aspm_disabled) | ||
527 | continue; | ||
528 | |||
511 | /* | 529 | /* |
512 | * Disable ASPM for pre-1.1 PCIe device, we follow MS to use | 530 | * Disable ASPM for pre-1.1 PCIe device, we follow MS to use |
513 | * RBER bit to determine if a function is 1.1 version device | 531 | * RBER bit to determine if a function is 1.1 version device |