platform-driver-x86.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] hp_wmi causing rfkill soft blocked wifi
@ 2022-10-28 15:55 Jorge Lopez
  2022-10-28 16:08 ` Limonciello, Mario
  0 siblings, 1 reply; 3+ messages in thread
From: Jorge Lopez @ 2022-10-28 15:55 UTC (permalink / raw)
  To: hdegoede, balalic.enver, platform-driver-x86, linux-kernel; +Cc: markgross

After upgrading BIOS to U82 01.02.01 Rev.A, the console is flooded
strange char "^@" which printed out every second and makes login
nearly impossible. Also the below messages were shown both in console
and journal/dmesg every second:

usb 1-3: Device not responding to setup address.
usb 1-3: device not accepting address 4, error -71
usb 1-3: device descriptor read/all, error -71
usb usb1-port3: unable to enumerate USB device

Wifi is soft blocked by checking rfkill. When unblocked manually,
after few seconds it would be soft blocked again. So I was suspecting
something triggered rfkill to soft block wifi.  At the end it was
fixed by removing hp_wmi module.

The root cause is the way hp-wmi driver handles command 1B on
post-2009 BIOS.  In pre-2009 BIOS, command 1Bh return 0x4 to indicate
that BIOS no longer controls the power for the wireless devices.

Signed-off-by: Jorge Lopez <jorge.lopez2@hp.com>

---
Based on the latest platform-drivers-x86.git/for-next
---
 drivers/platform/x86/hp-wmi.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp-wmi.c
index 627a6d0eaf83..29cd4e437d97 100644
--- a/drivers/platform/x86/hp-wmi.c
+++ b/drivers/platform/x86/hp-wmi.c
@@ -1300,8 +1300,15 @@ static int __init hp_wmi_bios_setup(struct platform_device *device)
 	wwan_rfkill = NULL;
 	rfkill2_count = 0;
 
-	if (hp_wmi_rfkill_setup(device))
-		hp_wmi_rfkill2_setup(device);
+	/*
+	 * In pre-2009 BIOS, command 1Bh return 0x4 to indicate that
+	 * BIOS no longer controls the power for the wireless
+	 * devices. All features supported by this command will no
+	 * longer be supported.
+	 */
+	if (!hp_wmi_bios_2009_later())
+		if (hp_wmi_rfkill_setup(device))
+			hp_wmi_rfkill2_setup(device);
 
 	err = hp_wmi_hwmon_init();
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: [PATCH v1] hp_wmi causing rfkill soft blocked wifi
  2022-10-28 15:55 [PATCH v1] hp_wmi causing rfkill soft blocked wifi Jorge Lopez
@ 2022-10-28 16:08 ` Limonciello, Mario
  2022-11-07 10:40   ` Hans de Goede
  0 siblings, 1 reply; 3+ messages in thread
From: Limonciello, Mario @ 2022-10-28 16:08 UTC (permalink / raw)
  To: Jorge Lopez, hdegoede, balalic.enver, platform-driver-x86, linux-kernel
  Cc: markgross, Tsao, Anson

[Public]

+Anson

> -----Original Message-----
> From: Jorge Lopez <jorgealtxwork@gmail.com>
> Sent: Friday, October 28, 2022 10:55
> To: hdegoede@redhat.com; balalic.enver@gmail.com; platform-driver-
> x86@vger.kernel.org; linux-kernel@vger.kernel.org
> Cc: markgross@kernel.org
> Subject: [PATCH v1] hp_wmi causing rfkill soft blocked wifi
> 
> After upgrading BIOS to U82 01.02.01 Rev.A, the console is flooded
> strange char "^@" which printed out every second and makes login
> nearly impossible. Also the below messages were shown both in console
> and journal/dmesg every second:
> 
> usb 1-3: Device not responding to setup address.
> usb 1-3: device not accepting address 4, error -71
> usb 1-3: device descriptor read/all, error -71
> usb usb1-port3: unable to enumerate USB device
> 
> Wifi is soft blocked by checking rfkill. When unblocked manually,
> after few seconds it would be soft blocked again. So I was suspecting
> something triggered rfkill to soft block wifi.  At the end it was
> fixed by removing hp_wmi module.
> 
> The root cause is the way hp-wmi driver handles command 1B on
> post-2009 BIOS.  In pre-2009 BIOS, command 1Bh return 0x4 to indicate
> that BIOS no longer controls the power for the wireless devices.
> 
> Signed-off-by: Jorge Lopez <jorge.lopez2@hp.com>

Link: https://bugzilla.kernel.org/show_bug.cgi?id=216468
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>

Hans,

Since this is effectively essentially removing the broken BIOS RFKILL interface
for numerous machines I think this should probably go to stable too, if you agree.

> 
> ---
> Based on the latest platform-drivers-x86.git/for-next
> ---
>  drivers/platform/x86/hp-wmi.c | 11 +++++++++--
>  1 file changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp-wmi.c
> index 627a6d0eaf83..29cd4e437d97 100644
> --- a/drivers/platform/x86/hp-wmi.c
> +++ b/drivers/platform/x86/hp-wmi.c
> @@ -1300,8 +1300,15 @@ static int __init hp_wmi_bios_setup(struct
> platform_device *device)
>  	wwan_rfkill = NULL;
>  	rfkill2_count = 0;
> 
> -	if (hp_wmi_rfkill_setup(device))
> -		hp_wmi_rfkill2_setup(device);
> +	/*
> +	 * In pre-2009 BIOS, command 1Bh return 0x4 to indicate that
> +	 * BIOS no longer controls the power for the wireless
> +	 * devices. All features supported by this command will no
> +	 * longer be supported.
> +	 */
> +	if (!hp_wmi_bios_2009_later())
> +		if (hp_wmi_rfkill_setup(device))
> +			hp_wmi_rfkill2_setup(device);
> 
>  	err = hp_wmi_hwmon_init();
> 
> --
> 2.34.1

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v1] hp_wmi causing rfkill soft blocked wifi
  2022-10-28 16:08 ` Limonciello, Mario
@ 2022-11-07 10:40   ` Hans de Goede
  0 siblings, 0 replies; 3+ messages in thread
From: Hans de Goede @ 2022-11-07 10:40 UTC (permalink / raw)
  To: Limonciello, Mario, Jorge Lopez, balalic.enver,
	platform-driver-x86, linux-kernel
  Cc: markgross, Tsao, Anson

Hi,

On 10/28/22 18:08, Limonciello, Mario wrote:
> [Public]
> 
> +Anson
> 
>> -----Original Message-----
>> From: Jorge Lopez <jorgealtxwork@gmail.com>
>> Sent: Friday, October 28, 2022 10:55
>> To: hdegoede@redhat.com; balalic.enver@gmail.com; platform-driver-
>> x86@vger.kernel.org; linux-kernel@vger.kernel.org
>> Cc: markgross@kernel.org
>> Subject: [PATCH v1] hp_wmi causing rfkill soft blocked wifi
>>
>> After upgrading BIOS to U82 01.02.01 Rev.A, the console is flooded
>> strange char "^@" which printed out every second and makes login
>> nearly impossible. Also the below messages were shown both in console
>> and journal/dmesg every second:
>>
>> usb 1-3: Device not responding to setup address.
>> usb 1-3: device not accepting address 4, error -71
>> usb 1-3: device descriptor read/all, error -71
>> usb usb1-port3: unable to enumerate USB device
>>
>> Wifi is soft blocked by checking rfkill. When unblocked manually,
>> after few seconds it would be soft blocked again. So I was suspecting
>> something triggered rfkill to soft block wifi.  At the end it was
>> fixed by removing hp_wmi module.
>>
>> The root cause is the way hp-wmi driver handles command 1B on
>> post-2009 BIOS.  In pre-2009 BIOS, command 1Bh return 0x4 to indicate
>> that BIOS no longer controls the power for the wireless devices.
>>
>> Signed-off-by: Jorge Lopez <jorge.lopez2@hp.com>
> 
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=216468
> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
> 
> Hans,
> 
> Since this is effectively essentially removing the broken BIOS RFKILL interface
> for numerous machines I think this should probably go to stable too, if you agree.

I agree, I've added a Cc: stable while merging this and I'll include this
in my next fixes pull-req to Linus.

Jorge, many thanks for fixing this!

Thank you for your patch, I've applied this patch to my review-hans 
branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans

Note it will show up in my review-hans branch once I've pushed my
local branch there, which might take a while.

Once I've run some tests on this branch the patches there will be
added to the platform-drivers-x86/for-next branch and eventually
will be included in the pdx86 pull-request to Linus for the next
merge-window.

Regards,

Hans



> 
>>
>> ---
>> Based on the latest platform-drivers-x86.git/for-next
>> ---
>>  drivers/platform/x86/hp-wmi.c | 11 +++++++++--
>>  1 file changed, 9 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp-wmi.c
>> index 627a6d0eaf83..29cd4e437d97 100644
>> --- a/drivers/platform/x86/hp-wmi.c
>> +++ b/drivers/platform/x86/hp-wmi.c
>> @@ -1300,8 +1300,15 @@ static int __init hp_wmi_bios_setup(struct
>> platform_device *device)
>>  	wwan_rfkill = NULL;
>>  	rfkill2_count = 0;
>>
>> -	if (hp_wmi_rfkill_setup(device))
>> -		hp_wmi_rfkill2_setup(device);
>> +	/*
>> +	 * In pre-2009 BIOS, command 1Bh return 0x4 to indicate that
>> +	 * BIOS no longer controls the power for the wireless
>> +	 * devices. All features supported by this command will no
>> +	 * longer be supported.
>> +	 */
>> +	if (!hp_wmi_bios_2009_later())
>> +		if (hp_wmi_rfkill_setup(device))
>> +			hp_wmi_rfkill2_setup(device);
>>
>>  	err = hp_wmi_hwmon_init();
>>
>> --
>> 2.34.1
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-11-07 10:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-28 15:55 [PATCH v1] hp_wmi causing rfkill soft blocked wifi Jorge Lopez
2022-10-28 16:08 ` Limonciello, Mario
2022-11-07 10:40   ` Hans de Goede

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).