Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit de189662 authored by Bjorn Helgaas's avatar Bjorn Helgaas
Browse files

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: default avatarBjorn Helgaas <bhelgaas@google.com>
Acked-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 43613a1f
Loading
Loading
Loading
Loading
+42 −42
Original line number Diff line number Diff line
@@ -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,