]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
platform/x86: hp-wmi: fix fan table parsing
authorKrishna Chomal <krishna.chomal108@gmail.com>
Fri, 10 Apr 2026 19:10:36 +0000 (00:40 +0530)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Tue, 14 Apr 2026 16:00:11 +0000 (19:00 +0300)
commit9d317a54e46d3b6420567dc5b63e9d7ff5c064a3
tree53e9913226144713767d71b96df094e41b6cf3a5
parent92c36b634b4586e02409488fa02a4908ee4ebea7
platform/x86: hp-wmi: fix fan table parsing

For Victus S devices, the BIOS fan table header was being incorrectly
parsed as:
struct {
u8 unknown;
u8 num_entries;
}

The first field should be num_fans and the second should be unknown. It
is pure coincidence that interpreting an "unknown" field as "num_entries"
worked on multiple device, however for board 8D87 (in an upcoming patch),
this assumption fails, and the hp-wmi driver fails to load.

We fix this by correcting the header definition and compensating for
num_entries by parsing each entry of the fan table until an all-NULL row
is obtained, mirroring the behavior of OMEN Gaming Hub on Windows.

Fixes: 46be1453e6e6 ("platform/x86: hp-wmi: add manual fan control for Victus S models")
Signed-off-by: Krishna Chomal <krishna.chomal108@gmail.com>
Link: https://patch.msgid.link/20260410191039.125659-2-krishna.chomal108@gmail.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/hp/hp-wmi.c