1
0
Fork 0
alistair23-linux/drivers/platform
Chris Chiu 98545815cf platform/x86: asus_wmi: Reserve more space for struct bias_args
[ Upstream commit 7b91f1565f ]

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>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-06-22 09:31:11 +02:00
..
chrome platform/chrome: cros_ec_rpmsg: Fix race with host event 2020-04-21 09:04:51 +02:00
goldfish treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
mellanox platform/mellanox: fix potential deadlock in the tmfifo driver 2020-01-17 19:48:42 +01:00
mips MIPS: Loongson: Fix return value of loongson_hwmon_init 2020-01-17 19:48:55 +01:00
olpc Platform: OLPC: add SPI MODULE_DEVICE_TABLE 2019-07-25 20:21:00 +03:00
x86 platform/x86: asus_wmi: Reserve more space for struct bias_args 2020-06-22 09:31:11 +02:00
Kconfig platform-drivers-x86 for v5.3-1 2019-07-14 16:51:47 -07:00
Makefile Platform: OLPC: Add XO-1.75 EC driver 2019-05-20 17:27:08 +03:00