PCI/ACPI: Separate out _OSC "we don't support enough services" path

Test the services we support (extended config space, ASPM, MSI) separately
so we can give a better message.  Previously we said "Unable to request
_OSC control..."; now we'll say "we support %#02x but %#02x are required".

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
Bjorn Helgaas 2013-09-05 15:50:52 -06:00
parent 43613a1fac
commit de18966228

View file

@ -392,7 +392,12 @@ static void negotiate_os_control(struct acpi_pci_root *root, int *no_aspm,
return;
}
if ((support & ACPI_PCIE_REQ_SUPPORT) == ACPI_PCIE_REQ_SUPPORT) {
if ((support & ACPI_PCIE_REQ_SUPPORT) != ACPI_PCIE_REQ_SUPPORT) {
dev_info(&device->dev, "Not requesting _OSC control (we support %#02x but %#02x are required)\n",
support, ACPI_PCIE_REQ_SUPPORT);
return;
}
control = OSC_PCI_EXPRESS_CAPABILITY_CONTROL
| OSC_PCI_EXPRESS_NATIVE_HP_CONTROL
| OSC_PCI_EXPRESS_PME_CONTROL;
@ -437,11 +442,6 @@ static void negotiate_os_control(struct acpi_pci_root *root, int *no_aspm,
*/
*no_aspm = 1;
}
} else {
dev_info(&device->dev,
"Unable to request _OSC control "
"(_OSC support mask: 0x%02x)\n", support);
}
}
static int acpi_pci_root_add(struct acpi_device *device,