Re: [PATCH v1 1/8] ACPI: bus: Fix handling of _OSC errors in acpi_run_osc()

Rafael J. Wysocki
2025-12-19T20:38:57Z

On Fri, Dec 19, 2025 at 1:26 PM Jonathan Cameron
<jonathan.cameron@huawei.com> wrote:
>
> On Thu, 18 Dec 2025 21:34:26 +0100
> "Rafael J. Wysocki" <rafael@kernel.org> wrote:
>
> > From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> >
> > The handling of _OSC errors in acpi_run_osc() is inconsistent.
>
> I wonder if this would be easier to follow with a brief statement
> of why we threat OSC_CAPABILITIES_MASK_ERROR as an error in the first
> place for non query cases? It took me a brief think and spec read
> to figure that out, but maybe more coffee needed.

Well, this is a good question and it is not obvious IMV.

The current code treats it as an error, but arguably it is not really an error.

If it is a query, it doesn't even make sense to print a debug message
for it, but if it is not a query, the feature mask in the _OSC return
buffer still represents the feature that the OS is expected to
control. So print the debug messages, but do not fail in that case.

I'll update the patch.