]> git.baikalelectronics.ru Git - kernel.git/commit
platform/x86: hp-wmi: Fix hp_wmi_read_int() reporting error (0x05)
authorJorge Lopez <jorge.lopez2@hp.com>
Thu, 10 Mar 2022 21:08:50 +0000 (15:08 -0600)
committerHans de Goede <hdegoede@redhat.com>
Mon, 14 Mar 2022 15:25:20 +0000 (16:25 +0100)
commitf3041f2258c74dea4ab17dbc84b8bef740aaed69
tree340133db534bb6940d910ad0ade57a3091955639
parentd73b37a331f5f9c1637da14bea2f89e68504a6b3
platform/x86: hp-wmi: Fix hp_wmi_read_int() reporting error (0x05)

The purpose of this patch is to introduce a fix to hp_wmi_read_int()
and eliminate failure error (0x05). Several WMI queries leverage
hp_wmi_read_int() to read their data and were failing with error 0x05.

HPWMI_DISPLAY_QUERY
HPWMI_HDDTEMP_QUERY
HPWMI_ALS_QUERY
HPWMI_HARDWARE_QUERY
HPWMI_WIRELESS_QUERY
HPWMI_POSTCODEERROR_QUERY

The failure occurs because hp_wmi_read_int() calls
hp_wmi_perform_query() with input parameter of size greater than zero.
Invoking those WMI commands with an input buffer size greater than
zero causes the command to be rejected and error 0x05 be returned.

All changes were validated on a HP ZBook Workstation notebook,
HP EliteBook x360, and HP EliteBook 850 G8.

Signed-off-by: Jorge Lopez <jorge.lopez2@hp.com>
Link: https://lore.kernel.org/r/20220310210853.28367-2-jorge.lopez2@hp.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/hp-wmi.c