From: Abhijeet Viswa <abhijeetviswa@gmail.com>
To: Hans de Goede <hdegoede@redhat.com>,
Mark Gross <markgross@kernel.org>,
Andy Shevchenko <andy@kernel.org>
Cc: platform-driver-x86@vger.kernel.org
Subject: Re: [PATCH] platform/x86: asus-wmi: Fix regression when probing for fan curve control
Date: Sat, 5 Feb 2022 17:35:39 +0530 [thread overview]
Message-ID: <94d60c8a-3716-7b29-be79-10ecad96cae3@gmail.com> (raw)
In-Reply-To: <20220205112840.33095-1-hdegoede@redhat.com>
Hi,
Tested this out and it works as expected. Thanks for the quick resolution!
Thanks
Abhijeet
On 05/02/22 16:58, Hans de Goede wrote:
> 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-by: Abhijeet V <abhijeetviswa@gmail.com>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
> 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 a3b83b22a3b1..2104a2621e50 100644
> --- a/drivers/platform/x86/asus-wmi.c
> +++ b/drivers/platform/x86/asus-wmi.c
> @@ -2223,7 +2223,7 @@ static int fan_curve_check_present(struct asus_wmi *asus, bool *available,
>
> err = fan_curve_get_factory_default(asus, fan_dev);
> if (err) {
> - if (err == -ENODEV)
> + if (err == -ENODEV || err == -ENODATA)
> return 0;
> return err;
> }
next prev parent reply other threads:[~2022-02-05 12:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-05 11:28 [PATCH] platform/x86: asus-wmi: Fix regression when probing for fan curve control Hans de Goede
2022-02-05 12:05 ` Abhijeet Viswa [this message]
2022-02-05 13:45 ` Hans de Goede
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=94d60c8a-3716-7b29-be79-10ecad96cae3@gmail.com \
--to=abhijeetviswa@gmail.com \
--cc=andy@kernel.org \
--cc=hdegoede@redhat.com \
--cc=markgross@kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox