PCI/ACPI: Separate out _OSC "PCIe port services disabled" path
authorBjorn Helgaas <bhelgaas@google.com>
Thu, 5 Sep 2013 21:07:43 +0000 (15:07 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Mon, 23 Sep 2013 23:40:47 +0000 (17:40 -0600)
Test "pcie_ports_disabled" separately so we can give a better message.
Previously we said "Unable to request _OSC control..."; now we'll
say "PCIe port services disabled; not requesting _OSC control".

"pcie_ports_disabled" is true when CONFIG_PCIEPORTBUS=n or we boot
with "pcie_ports=compat".

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/pci_root.c

index 67cc43a134ad9e25aed3504ce410e12554bafa25..68e5a187e784487fe4272b09239e55f4aa9e9583 100644 (file)
@@ -387,8 +387,12 @@ static void negotiate_os_control(struct acpi_pci_root *root, int *no_aspm,
                return;
        }
 
-       if (!pcie_ports_disabled
-           && (support & ACPI_PCIE_REQ_SUPPORT) == ACPI_PCIE_REQ_SUPPORT) {
+       if (pcie_ports_disabled) {
+               dev_info(&device->dev, "PCIe port services disabled; not requesting _OSC control\n");
+               return;
+       }
+
+       if ((support & ACPI_PCIE_REQ_SUPPORT) == ACPI_PCIE_REQ_SUPPORT) {
                control = OSC_PCI_EXPRESS_CAPABILITY_CONTROL
                        | OSC_PCI_EXPRESS_NATIVE_HP_CONTROL
                        | OSC_PCI_EXPRESS_PME_CONTROL;