Re: Regression in asus-wmi due to fan curve patches

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

 



Hi,

On 2/5/22 12:01, Abhijeet Viswa wrote:
> Hi, 
> 
> On 05/02/22 15:46, Hans de Goede wrote:
>>> Firstly, apologies if I have included/excluded the wrong mailing list or persons in this email. This is my first time doing this and I've tried my best to make sure it is accurate.
>>
>> No worries, it looks like you've done a pretty good job at picking the
>> right people + lists. And even if you didn't with regressions like this
>> *the* most important thing is to get the word out quickly, so thank
>> you for doing that!
> 
> Thanks. I'm happy to hear this.
> 
> I tried a git-format patch which created an email patch. Wasn't sure if I had to send a separate patch email, so I've decided to inline the patch contents at the end of this email. And, I certify that the changes are mine and license them under the same license as the files modified.

Thank you for the patch and for the nice commit message.

I've come up with a slightly different version where -ENODATA is checked
inside the fan_curve_check_present() helper. This way if e.g. there
is a CPU fan-curve but no GPU fan-curve, because e.g. there is no
separate GPU fan the hwmon device will still get registered for just
the CPU fan curve.

I'll send out my version right after this email, if you can test it
that would be great.

> Hopefully inlining it is fine. If not, I could provide it as an attachment.

Since I've come up with a different approach I did not try to apply it,
but inlining often leads to issues due to replaceing tabs with spaces
and linewrapping. Although it seems your mail-client has done neither,
which is good.

Still for the next time, the preferred way to submit patches is to
use git send-email which does not have any of these issues.

Regards,

Hans


> ~~~
> 
> From f5bae0a579dc211c329c7aa08837e462aee1af6b Mon Sep 17 00:00:00 2001
> From: Abhijeet V <abhijeetviswa@xxxxxxxxx>
> Date: Sat, 5 Feb 2022 15:57:23 +0530
> Subject: [PATCH] asus-wmi: Fix regression when probing for fan curve control
> 
> The fan curve control patches introduced a regression for atleast 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.
> 
> Signed-off-by: Abhijeet V <abhijeetviswa@xxxxxxxxx>
> ---
>  drivers/platform/x86/asus-wmi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
> index a3b83b22a3b..adeb58765dc 100644
> --- a/drivers/platform/x86/asus-wmi.c
> +++ b/drivers/platform/x86/asus-wmi.c
> @@ -3585,7 +3585,7 @@ static int asus_wmi_add(struct platform_device *pdev)
>  		goto fail_hwmon;
>  
>  	err = asus_wmi_custom_fan_curve_init(asus);
> -	if (err)
> +	if (err && err != -ENODATA)
>  		goto fail_custom_fan_curve;
>  
>  	err = asus_wmi_led_init(asus);
> 




[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux