]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
platform/x86: asus-wmi: Fix regression when probing for fan curve control
authorHans de Goede <hdegoede@redhat.com>
Sat, 5 Feb 2022 11:28:40 +0000 (12:28 +0100)
committerAndrea Righi <andrea.righi@canonical.com>
Thu, 9 Mar 2023 14:57:37 +0000 (15:57 +0100)
commitb0478cd3e30746bdded9eaa23880b20f5c836725
tree2059615229ae1cb7bb635a639d3cb5b1f528835e
parentce81131bf33a50adcbcb557f383c2bd0d6cbf2cd
platform/x86: asus-wmi: Fix regression when probing for fan curve control

BugLink: https://bugs.launchpad.net/bugs/1968984
commit d717e4509af0380a94dbc28b61839df39f17e1eb upstream.

The fan curve control patches introduced a regression for at least the
TUF FX506 and possibly other TUF series laptops that do not have support
for fan curve control.

As part of the probing process, asus_wmi_evaluate_method_buf is called
to get the factory default fan curve . The WMI management function
returns 0 on certain laptops to indicate lack of fan curve control
instead of ASUS_WMI_UNSUPPORTED_METHOD. This 0 is transformed to
-ENODATA which results in failure when probing.

Fixes: 0f0ac158d28f ("platform/x86: asus-wmi: Add support for custom fan curves")
Reported-and-tested-by: Abhijeet V <abhijeetviswa@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20220205112840.33095-1-hdegoede@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
drivers/platform/x86/asus-wmi.c