aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/pci_root.c
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2013-09-05 17:07:42 -0400
committerBjorn Helgaas <bhelgaas@google.com>2013-09-23 19:40:46 -0400
commit1b2a7be60eaaf17bc88368d748471dd70e40befd (patch)
tree4ff0841f85f2e4beb2ac9897bb3d521373872d65 /drivers/acpi/pci_root.c
parentb8eb67fcc4548b9f0d00bbfd1c0c8f72d8018900 (diff)
PCI/ACPI: Run _OSC only once for OSPM feature support
Previously, we ran _OSC once to tell the platform that we support PCI Segment Groups, then we ran it again if we supported any additional features (ASPM, MSI, or extended config space). I don't think it's necessary to run it twice, since we can easily build the complete mask of features we support before running _OSC the first time. We run _OSC again later when requesting control of PCIe features; that's unaffected by this change. Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/pci_root.c')
-rw-r--r--drivers/acpi/pci_root.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c
index 3e06d4e179ec..0e2004100c44 100644
--- a/drivers/acpi/pci_root.c
+++ b/drivers/acpi/pci_root.c
@@ -373,23 +373,18 @@ static void negotiate_os_control(struct acpi_pci_root *root, int *no_aspm,
373 * PCI domains, so we indicate this in _OSC support capabilities. 373 * PCI domains, so we indicate this in _OSC support capabilities.
374 */ 374 */
375 support = base_support = OSC_PCI_SEGMENT_GROUPS_SUPPORT; 375 support = base_support = OSC_PCI_SEGMENT_GROUPS_SUPPORT;
376 acpi_pci_osc_support(root, support);
377
378 if (pci_ext_cfg_avail()) 376 if (pci_ext_cfg_avail())
379 support |= OSC_PCI_EXT_CONFIG_SUPPORT; 377 support |= OSC_PCI_EXT_CONFIG_SUPPORT;
380 if (pcie_aspm_support_enabled()) { 378 if (pcie_aspm_support_enabled())
381 support |= OSC_PCI_ASPM_SUPPORT | OSC_PCI_CLOCK_PM_SUPPORT; 379 support |= OSC_PCI_ASPM_SUPPORT | OSC_PCI_CLOCK_PM_SUPPORT;
382 }
383 if (pci_msi_enabled()) 380 if (pci_msi_enabled())
384 support |= OSC_PCI_MSI_SUPPORT; 381 support |= OSC_PCI_MSI_SUPPORT;
385 if (support != base_support) { 382 status = acpi_pci_osc_support(root, support);
386 status = acpi_pci_osc_support(root, support); 383 if (ACPI_FAILURE(status)) {
387 if (ACPI_FAILURE(status)) { 384 dev_info(&device->dev, "ACPI _OSC support "
388 dev_info(&device->dev, "ACPI _OSC support " 385 "notification failed, disabling PCIe ASPM\n");
389 "notification failed, disabling PCIe ASPM\n"); 386 *no_aspm = 1;
390 *no_aspm = 1; 387 support = base_support;
391 support = base_support;
392 }
393 } 388 }
394 389
395 if (!pcie_ports_disabled 390 if (!pcie_ports_disabled