platform/x86: asus-wmi: Fix regression when probing for fan curve control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Hans de Goede <hdegoede@xxxxxxxxxx>

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@xxxxxxxxx>
Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx>
Link: https://lore.kernel.org/r/20220205112840.33095-1-hdegoede@xxxxxxxxxx
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/platform/x86/asus-wmi.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/platform/x86/asus-wmi.c
+++ b/drivers/platform/x86/asus-wmi.c
@@ -2059,7 +2059,7 @@ static int fan_boost_mode_check_present(
 	err = asus_wmi_get_devstate(asus, ASUS_WMI_DEVID_FAN_BOOST_MODE,
 				    &result);
 	if (err) {
-		if (err == -ENODEV)
+		if (err == -ENODEV || err == -ENODATA)
 			return 0;
 		else
 			return err;


Patches currently in stable-queue which might be from hdegoede@xxxxxxxxxx are

queue-5.17/media-i2c-ov5648-fix-lockdep-error.patch
queue-5.17/fbdev-hot-unplug-firmware-fb-devices-on-forced-removal.patch
queue-5.17/platform-x86-asus-wmi-fix-regression-when-probing-for-fan-curve-control.patch
queue-5.17/media-atomisp_gmin_platform-add-dmi-quirk-to-not-tur.patch
queue-5.17/iio-mma8452-fix-probe-failing-when-an-i2c_device_id-.patch
queue-5.17/hwmon-sch56xx-common-replace-wdog_active-with-wdog_h.patch
queue-5.17/acpi-x86-add-skip-i2c-clients-quirk-for-nextbook-are.patch
queue-5.17/acpi-x86-add-skip-i2c-clients-quirk-for-lenovo-yoga-.patch
queue-5.17/drm-simpledrm-add-panel-orientation-property-on-non-upright-mounted-lcd-panels.patch
queue-5.17/revert-input-clear-btn_right-middle-on-buttonpads.patch
queue-5.17/platform-x86-huawei-wmi-check-the-return-value-of-de.patch
queue-5.17/power-supply-bq24190_charger-fix-bq24190_vbus_is_ena.patch
queue-5.17/acpica-avoid-walking-the-acpi-namespace-if-it-is-not.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux