Commit a246670ddee3132fa71f8993d3989ad8ac04d965

Authored by Rafael J. Wysocki
Committed by Jesse Barnes
1 parent c0a86a9bea

PCI/ACPI: Report _OSC control mask returned on failure to get control

If an attempt to get _OSC control of the PCIe native features from the
BIOS fails, report the resulting mask of control flags the BIOS was
willing to grant in the error message.  Moreover, if the _OSC support
mask is insufficient for requesting control of the PCIe native features
or pcie_ports_disabled is set, print a diagnostic message containing the
_OSC support mask.  This helps to diagnose obscure _OSC-related problems
on a number machines.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>

Showing 1 changed file with 10 additions and 4 deletions Side-by-side Diff

drivers/acpi/pci_root.c
... ... @@ -596,12 +596,18 @@
596 596 dev_info(root->bus->bridge,
597 597 "ACPI _OSC control (0x%02x) granted\n", flags);
598 598 } else {
599   - dev_dbg(root->bus->bridge,
600   - "ACPI _OSC request failed (code %d)\n", status);
601   - printk(KERN_INFO "Unable to assume _OSC PCIe control. "
602   - "Disabling ASPM\n");
  599 + dev_info(root->bus->bridge,
  600 + "ACPI _OSC request failed (%s), "
  601 + "returned control mask: 0x%02x\n",
  602 + acpi_format_exception(status), flags);
  603 + pr_info("ACPI _OSC control for PCIe not granted, "
  604 + "disabling ASPM\n");
603 605 pcie_no_aspm();
604 606 }
  607 + } else {
  608 + dev_info(root->bus->bridge,
  609 + "Unable to request _OSC control "
  610 + "(_OSC support mask: 0x%02x)\n", flags);
605 611 }
606 612  
607 613 pci_acpi_add_bus_pm_notifier(device, root->bus);