All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Jorge Lopez <jorgealtxwork@gmail.com>
Cc: Platform Driver <platform-driver-x86@vger.kernel.org>
Subject: Re: [PATCH v2 1/2] Resolve WMI query failures on some devices
Date: Wed, 8 Jun 2022 20:44:27 +0200	[thread overview]
Message-ID: <CAHp75VdPOSHyHiwFWYR6_BuoUXca9wvYFkgy7wXBW305FGHigA@mail.gmail.com> (raw)
In-Reply-To: <20220608170220.5751-2-jorge.lopez2@hp.com>

On Wed, Jun 8, 2022 at 7:20 PM Jorge Lopez <jorgealtxwork@gmail.com> wrote:
>
> WMI queries fail on some devices where the ACPI method HWMC
> unconditionally attempts to create Fields beyond the buffer
> if the buffer is too small, this breaks essential features
> such as power profiles:
>
>          CreateByteField (Arg1, 0x10, D008)
>          CreateByteField (Arg1, 0x11, D009)
>          CreateByteField (Arg1, 0x12, D010)
>          CreateDWordField (Arg1, 0x10, D032)
>          CreateField (Arg1, 0x80, 0x0400, D128)
>
> In cases where args->data had zero length, ACPI BIOS Error
> (bug): AE_AML_BUFFER_LIMIT, Field [D008] at bit
> offset/length 128/8 exceeds size of target Buffer (128 bits)
> (20211217/dsopcode-198) was obtained.
>
> ACPI BIOS Error (bug): AE_AML_BUFFER_LIMIT, Field [D009] at bit
> offset/length 136/8 exceeds size of target Buffer (136bits)
> (20211217/dsopcode-198)
>
> The original code created a buffer size of 128 bytes regardless if
> the WMI call required a smaller buffer or not.  This particular
> behavior occurs in older BIOS and reproduced in OMEN laptops.  Newer
> BIOS handles buffer sizes properly and meets the latest specification
> requirements.  This is the reason why testing with a dynamically
> allocated buffer did not uncover any failures with the test systems at
> hand.
>
> This patch was tested on several OMEN, Elite, and Zbooks.  It was
> confirmed the patch resolves HPWMI_FAN GET/SET calls in an OMEN
> Laptop 15-ek0xxx.  No problems were reported when testing on several Elite
> and Zbooks notebooks.

...

>         struct bios_args *args = NULL;
>         int mid, actual_outsize, ret;
>         size_t bios_args_size;
> +       int actual_insize;

Same comment as per v1.

Please, be careful and read all comments you have been given and react
to them either by explaining why it's not worth to address or with an
addressed changes.

-- 
With Best Regards,
Andy Shevchenko

  reply	other threads:[~2022-06-08 18:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-08 17:02 [PATCH v2 0/2] Resolve-WMI-query-failures-on-some-devices Jorge Lopez
2022-06-08 17:02 ` [PATCH v2 1/2] Resolve WMI query failures on some devices Jorge Lopez
2022-06-08 18:44   ` Andy Shevchenko [this message]
2022-06-08 21:03     ` Jorge Lopez
2022-06-09 10:49       ` Andy Shevchenko
2022-06-09 13:45         ` Jorge Lopez
2022-06-09 15:06           ` Andy Shevchenko
2022-06-08 17:02 ` [PATCH v2 2/2] Organize declaration variables Jorge Lopez
2022-06-08 18:45   ` Andy Shevchenko
2022-06-08 19:31     ` Jorge Lopez
2022-06-08 18:42 ` [PATCH v2 0/2] Resolve-WMI-query-failures-on-some-devices Andy Shevchenko
2022-06-08 19:28   ` Jorge Lopez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAHp75VdPOSHyHiwFWYR6_BuoUXca9wvYFkgy7wXBW305FGHigA@mail.gmail.com \
    --to=andy.shevchenko@gmail.com \
    --cc=jorgealtxwork@gmail.com \
    --cc=platform-driver-x86@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.