mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Chris Chiu <chiu@endlessm.com>,
	dvhart@infradead.org, andy@infradead.org,
	gregkh@linuxfoundation.org, gayatri.kammela@intel.com,
	mika.westerberg@linux.intel.com
Cc: platform-driver-x86@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux@endlessm.com
Subject: Re: [PATCH] platform/x86: asus_wmi: Reserve more space for struct bias_args
Date: Fri, 22 May 2020 12:14:29 +0200	[thread overview]
Message-ID: <370d5f70-cb37-3ac8-7a7e-97f215b0ad8a@redhat.com> (raw)
In-Reply-To: <20200522074424.54264-1-chiu@endlessm.com>

Hi,

On 5/22/20 9:44 AM, Chris Chiu wrote:
> On the ASUS laptop UX325JA/UX425JA, most of the media keys are not
> working due to the ASUS WMI driver fails to be loaded. The ACPI error
> as follows leads to the failure of asus_wmi_evaluate_method.
>    ACPI BIOS Error (bug): AE_AML_BUFFER_LIMIT, Field [IIA3] at bit offset/length 96/32 exceeds size of target Buffer (96 bits) (20200326/dsopcode-203)
>    No Local Variables are initialized for Method [WMNB]
>    ACPI Error: Aborting method \_SB.ATKD.WMNB due to previous error (AE_AML_BUFFER_LIMIT) (20200326/psparse-531)
> 
> The DSDT for the WMNB part shows that 5 DWORD required for local
> variables and the 3rd variable IIA3 hit the buffer limit.
> 
> Method (WMNB, 3, Serialized)
> { ..
>      CreateDWordField (Arg2, Zero, IIA0)
>      CreateDWordField (Arg2, 0x04, IIA1)
>      CreateDWordField (Arg2, 0x08, IIA2)
>      CreateDWordField (Arg2, 0x0C, IIA3)
>      CreateDWordField (Arg2, 0x10, IIA4)
>      Local0 = (Arg1 & 0xFFFFFFFF)
>      If ((Local0 == 0x54494E49))
>    ..
> }
> 
> The limitation is determined by the input acpi_buffer size passed
> to the wmi_evaluate_method. Since the struct bios_args is the data
> structure used as input buffer by default for all ASUS WMI calls,
> the size needs to be expanded to fix the problem.
> 
> Signed-off-by: Chris Chiu <chiu@endlessm.com>

Thank you, patch looks good to me:

Reviewed-by: Hans de Goede <hdegoede@redhat.com>

Regards,

Hans


> ---
>   drivers/platform/x86/asus-wmi.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
> index bb7c529d7d16..cd212ee210e2 100644
> --- a/drivers/platform/x86/asus-wmi.c
> +++ b/drivers/platform/x86/asus-wmi.c
> @@ -116,6 +116,8 @@ struct bios_args {
>   	u32 arg0;
>   	u32 arg1;
>   	u32 arg2; /* At least TUF Gaming series uses 3 dword input buffer. */
> +	u32 arg4;
> +	u32 arg5;
>   } __packed;
>   
>   /*
> 


      reply	other threads:[~2020-05-22 10:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-22  7:44 Chris Chiu
2020-05-22 10:14 ` Hans de Goede [this message]

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=370d5f70-cb37-3ac8-7a7e-97f215b0ad8a@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=andy@infradead.org \
    --cc=chiu@endlessm.com \
    --cc=dvhart@infradead.org \
    --cc=gayatri.kammela@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@endlessm.com \
    --cc=mika.westerberg@linux.intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®