Re: [PATCH] ACPI: don't show an error when we're not in charge of PCIe hotplug.

From: Rafael J. Wysocki
Date: Wed Jun 15 2016 - 20:12:43 EST


On Thu, Jun 16, 2016 at 12:15 AM, Peter Jones <pjones@xxxxxxxxxx> wrote:
> Right now when booting, on many laptops the firmware manages the PCIe
> bus. As a result, when we call the _OSC ACPI method, it returns an
> error code. Unfortunately the errors are not very articulate.

What exactly do you mean here?

> As a result, we show:
>
> ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-fe])
> acpi PNP0A08:00: _OSC: OS supports [ExtendedConfig ASPM ClockPM Segments MSI]
> \_SB_.PCI0 (33DB4D5B-1FF7-401C-9657-7441C03DD766): _OSC invalid UUID
> _OSC request data: 1 1f 0

So _OSC told us that the UUID was invalid, didn't it?

According to the spec:

"Bit [2] â Unrecognized UUID. This bit is set to indicate that the
platform firmware does not
recognize the UUID passed in via Arg0. Capabilities bits are preserved."

> acpi PNP0A08:00: _OSC failed (AE_ERROR); disabling ASPM
>
> But we did get the capabilities mask back;

Right. As per the spec quoted above.

> the firmware is merely managing this itself.

How can we know that?

> So we really should not be showing the user a
> message that looks like the firmware is broken, since it is working just
> fine.

Or is it?

> This patch supresses the error message when we're calling _OSC with the
> PCIe host bridge UUID, and replaces it with a relatively innocuous
> looking message that you can find if you're looking for it.

So what happens is that the firmware manages the PCIe stuff itself,
but instead of telling that to us upfront by clearing the mask, it
simply says that the UUID is unknown, because ASL writers can't be
bothered with handling that case correctly, right?

Thanks,
Rafael