]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/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)
committerKhalid Elmously <khalid.elmously@canonical.com>
Wed, 29 Jan 2020 04:45:21 +0000 (23:45 -0500)
commit408e60cba9c05865c41de4b2f3a900f00cd951a3
tree9e0dc5ce56d94553817799625cabd3aaef7c1de9
parent8151a9a2f78dee13208c0c32b2ab5cda7693d8e8
platform/x86: hp-wmi: Make buffer for HPWMI_FEATURE2_QUERY 128 bytes

BugLink: https://bugs.launchpad.net/bugs/1859712
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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/platform/x86/hp-wmi.c