aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2013-09-05 17:07:43 -0400
committerBjorn Helgaas <bhelgaas@google.com>2013-09-23 19:40:46 -0400
commit65afe91622c456560e20d57a779b807c20822e81 (patch)
tree4c5706dfa23005a4876cb67370406f3be6587c0c /drivers/acpi
parent1b2a7be60eaaf17bc88368d748471dd70e40befd (diff)
PCI/ACPI: Skip _OSC control tests if _OSC support call failed
If the _OSC support notification fails, we will never request control (because "support == OSC_PCI_SEGMENT_GROUPS_SUPPORT", which doesn't include all the features in ACPI_PCIE_REQ_SUPPORT), so we can return early to simplify the code. Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/pci_root.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c
index 0e2004100c44..67cc43a134ad 100644
--- a/drivers/acpi/pci_root.c
+++ b/drivers/acpi/pci_root.c
@@ -363,7 +363,7 @@ EXPORT_SYMBOL(acpi_pci_osc_control_set);
363static void negotiate_os_control(struct acpi_pci_root *root, int *no_aspm, 363static void negotiate_os_control(struct acpi_pci_root *root, int *no_aspm,
364 int *clear_aspm) 364 int *clear_aspm)
365{ 365{
366 u32 support, base_support, control; 366 u32 support, control;
367 acpi_status status; 367 acpi_status status;
368 struct acpi_device *device = root->device; 368 struct acpi_device *device = root->device;
369 acpi_handle handle = device->handle; 369 acpi_handle handle = device->handle;
@@ -372,7 +372,7 @@ static void negotiate_os_control(struct acpi_pci_root *root, int *no_aspm,
372 * All supported architectures that use ACPI have support for 372 * All supported architectures that use ACPI have support for
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 = OSC_PCI_SEGMENT_GROUPS_SUPPORT;
376 if (pci_ext_cfg_avail()) 376 if (pci_ext_cfg_avail())
377 support |= OSC_PCI_EXT_CONFIG_SUPPORT; 377 support |= OSC_PCI_EXT_CONFIG_SUPPORT;
378 if (pcie_aspm_support_enabled()) 378 if (pcie_aspm_support_enabled())
@@ -381,10 +381,10 @@ static void negotiate_os_control(struct acpi_pci_root *root, int *no_aspm,
381 support |= OSC_PCI_MSI_SUPPORT; 381 support |= OSC_PCI_MSI_SUPPORT;
382 status = acpi_pci_osc_support(root, support); 382 status = acpi_pci_osc_support(root, support);
383 if (ACPI_FAILURE(status)) { 383 if (ACPI_FAILURE(status)) {
384 dev_info(&device->dev, "ACPI _OSC support " 384 dev_info(&device->dev, "_OSC failed (%s); disabling ASPM\n",
385 "notification failed, disabling PCIe ASPM\n"); 385 acpi_format_exception(status));
386 *no_aspm = 1; 386 *no_aspm = 1;
387 support = base_support; 387 return;
388 } 388 }
389 389
390 if (!pcie_ports_disabled 390 if (!pcie_ports_disabled