]> git.itanic.dy.fi Git - linux-stable/commit
platform/x86: hp-wmi: Make buffer for HPWMI_FEATURE2_QUERY 128 bytes
authorHans de Goede <hdegoede@redhat.com>
Tue, 17 Dec 2019 19:06:04 +0000 (20:06 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 4 Jan 2020 12:34:22 +0000 (13:34 +0100)
commit7fd8e24970ba4e4f0e5aa36e9f5cd7b503c279d1
treef905f2f03f76518dca36da72cfbc2c402612c69d
parent60da88251e489ce7a24f7180ebb88dff853860dc
platform/x86: hp-wmi: Make buffer for HPWMI_FEATURE2_QUERY 128 bytes

commit 133b2acee3871ae6bf123b8fe34be14464aa3d2c upstream.

At least on the HP Envy x360 15-cp0xxx model the WMI interface
for HPWMI_FEATURE2_QUERY requires an outsize of at least 128 bytes,
otherwise it fails with an error code 5 (HPWMI_RET_INVALID_PARAMETERS):

Dec 06 00:59:38 kernel: hp_wmi: query 0xd returned error 0x5

We do not care about the contents of the buffer, we just want to know
if the HPWMI_FEATURE2_QUERY command is supported.

This commits bumps the buffer size, fixing the error.

Fixes: 8a1513b4932 ("hp-wmi: limit hotkey enable")
Cc: stable@vger.kernel.org
BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1520703
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/platform/x86/hp-wmi.c