LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Yurii Pavlovskyi <yurii.pavlovskyi@gmail.com>
Cc: Corentin Chary <corentin.chary@gmail.com>,
	Darren Hart <dvhart@infradead.org>,
	Andy Shevchenko <andy@infradead.org>,
	Daniel Drake <drake@endlessm.com>,
	acpi4asus-user <acpi4asus-user@lists.sourceforge.net>,
	Platform Driver <platform-driver-x86@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 03/11] platform/x86: asus-wmi: Increase the input buffer size of WMI methods
Date: Wed, 8 May 2019 16:30:03 +0300	[thread overview]
Message-ID: <CAHp75Ve0MrS2_ROzo4_o9oTjTvs+GSfUn=2CRQx1L_W+5JR6Vw@mail.gmail.com> (raw)
In-Reply-To: <5e1a56c3-0448-a648-e331-a2e1d0421b56@gmail.com>

On Fri, Apr 19, 2019 at 1:07 PM Yurii Pavlovskyi
<yurii.pavlovskyi@gmail.com> wrote:
>
> The asus-nb-wmi driver is matched by WMI alias but fails to load on TUF
> Gaming series laptops producing multiple ACPI errors in the kernel log.
>
> The input buffer for WMI method invocation size is 2 dwords, whereas
> 3 are expected by this model.
>
> FX505GM:
> ..
> Method (WMNB, 3, Serialized)
> {
>     P8XH (Zero, 0x11)
>     CreateDWordField (Arg2, Zero, IIA0)
>     CreateDWordField (Arg2, 0x04, IIA1)
>     CreateDWordField (Arg2, 0x08, IIA2)
>     Local0 = (Arg1 & 0xFFFFFFFF)
>     ...
>
> Compare with older K54C:
> ...
> Method (WMNB, 3, NotSerialized)
> {
>     CreateDWordField (Arg2, 0x00, IIA0)
>     CreateDWordField (Arg2, 0x04, IIA1)
>     Local0 = (Arg1 & 0xFFFFFFFF)
>     ...
>
> Increase buffer size to 3 dwords. No negative consequences of this change
> are expected, as the input buffer size is not verified. The original
> function is replaced by a wrapper for a new method passing value 0 for the
> last parameter. The new function will be used to control RGB keyboard
> backlight.


> -int asus_wmi_evaluate_method(u32 method_id, u32 arg0, u32 arg1, u32 *retval)
> +static int asus_wmi_evaluate_method_3dw(u32 method_id, u32 arg0, u32 arg1,
> +               u32 arg2, u32 *retval)

I would name as "..._method3" and move arg2 to previous line

>  {
>         struct bios_args args = {
>                 .arg0 = arg0,
>                 .arg1 = arg1,
> +               .arg2 = arg2

Keep comma, it will help in the future, like above helped you here.

--
With Best Regards,
Andy Shevchenko

  reply	other threads:[~2019-05-08 13:30 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-19  9:57 [PATCH v3 00/11] asus-wmi: Support of ASUS TUF Gaming series laptops Yurii Pavlovskyi
2019-04-19 10:00 ` [PATCH v3 01/11] platform/x86: asus-wmi: Fix hwmon device cleanup Yurii Pavlovskyi
2019-05-08 13:25   ` Andy Shevchenko
2019-04-19 10:03 ` [PATCH v3 02/11] platform/x86: asus-wmi: Fix preserving keyboard backlight intensity on load Yurii Pavlovskyi
2019-04-19 10:05 ` [PATCH v3 03/11] platform/x86: asus-wmi: Increase the input buffer size of WMI methods Yurii Pavlovskyi
2019-05-08 13:30   ` Andy Shevchenko [this message]
2019-04-19 10:08 ` [PATCH v3 04/11] platform/x86: asus-wmi: Improve DSTS WMI method ID detection Yurii Pavlovskyi
2019-05-08 13:36   ` Andy Shevchenko
2019-05-09  6:08     ` Daniel Drake
2019-05-09 17:29       ` Yurii Pavlovskyi
2019-05-09 17:57         ` Andy Shevchenko
2019-04-19 10:10 ` [PATCH v3 05/11] platform/x86: asus-wmi: Support WMI event queue Yurii Pavlovskyi
2019-05-08 13:47   ` Andy Shevchenko
2019-05-09 17:36     ` Yurii Pavlovskyi
2019-04-19 10:11 ` [PATCH v3 06/11] platform/x86: asus-nb-wmi: Add microphone mute key code Yurii Pavlovskyi
2019-04-19 10:12 ` [PATCH v3 07/11] platform/x86: asus-wmi: Organize code into sections Yurii Pavlovskyi
2019-05-08 13:46   ` Andy Shevchenko
2019-04-19 10:12 ` [PATCH v3 08/11] platform/x86: asus-wmi: Enhance detection of thermal data Yurii Pavlovskyi
2019-04-24 18:25   ` Pawnikar, Sumeet R
2019-04-25 18:51     ` Yurii Pavlovskyi
2019-05-08 13:58   ` Andy Shevchenko
2019-05-09 17:49     ` Yurii Pavlovskyi
2019-05-09 17:54       ` Andy Shevchenko
2019-04-19 10:14 ` [PATCH v3 09/11] platform/x86: asus-wmi: Control RGB keyboard backlight Yurii Pavlovskyi
2019-05-08 14:02   ` Andy Shevchenko
2019-05-08 17:12     ` Pavel Machek
2019-05-09 19:04       ` Yurii Pavlovskyi
2019-05-09 20:45         ` Dan Murphy
2019-05-09 21:06           ` Andy Shevchenko
2019-05-09 21:44             ` Dan Murphy
2019-05-09 22:15             ` Pavel Machek
2019-05-09 22:34           ` Pavel Machek
2019-04-19 10:15 ` [PATCH v3 10/11] platform/x86: asus-wmi: Switch fan boost mode Yurii Pavlovskyi
2019-04-19 10:16 ` [PATCH v3 11/11] platform/x86: asus-wmi: Do not disable keyboard backlight on unloading Yurii Pavlovskyi
2019-05-08 13:26 ` [PATCH v3 00/11] asus-wmi: Support of ASUS TUF Gaming series laptops Andy Shevchenko

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='CAHp75Ve0MrS2_ROzo4_o9oTjTvs+GSfUn=2CRQx1L_W+5JR6Vw@mail.gmail.com' \
    --to=andy.shevchenko@gmail.com \
    --cc=acpi4asus-user@lists.sourceforge.net \
    --cc=andy@infradead.org \
    --cc=corentin.chary@gmail.com \
    --cc=drake@endlessm.com \
    --cc=dvhart@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=yurii.pavlovskyi@gmail.com \
    --subject='Re: [PATCH v3 03/11] platform/x86: asus-wmi: Increase the input buffer size of WMI methods' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).