linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] wifi: rtw88: 8822b: disable call trace when write RF mode table fail
@ 2023-10-12 14:01 Chukun Pan
  2023-10-13  1:11 ` Ping-Ke Shih
  0 siblings, 1 reply; 8+ messages in thread
From: Chukun Pan @ 2023-10-12 14:01 UTC (permalink / raw)
  To: Ping-Ke Shih; +Cc: Kalle Valo, linux-wireless, linux-kernel, Chukun Pan

The rtw88 driver throws a useless Call Trace when the rtl8812bu
or rtl8822be wifi modules fail to write the RF mode table.
Since this does not affect normal use of the wifi modules,
replace WARN() with driver warning to avoid useless panic.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
---
 drivers/net/wireless/realtek/rtw88/rtw8822b.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/realtek/rtw88/rtw8822b.c b/drivers/net/wireless/realtek/rtw88/rtw8822b.c
index 3017a9760da8..06b6efcd16d2 100644
--- a/drivers/net/wireless/realtek/rtw88/rtw8822b.c
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822b.c
@@ -820,8 +820,10 @@ static void rtw8822b_config_trx_mode(struct rtw_dev *rtwdev, u8 tx_path,
 			break;
 	}
 
-	if (WARN(counter <= 0, "write RF mode table fail\n"))
+	if (counter <= 0) {
+		rtw_warn(rtwdev, "write RF mode table fail\n");
 		return;
+	}
 
 	rtw_write_rf(rtwdev, RF_PATH_A, RF_LUTWE, RFREG_MASK, 0x80000);
 	rtw_write_rf(rtwdev, RF_PATH_A, RF_LUTWA, RFREG_MASK, 0x00001);
-- 
2.25.1


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

* RE: [PATCH 1/1] wifi: rtw88: 8822b: disable call trace when write RF mode table fail
  2023-10-12 14:01 [PATCH 1/1] wifi: rtw88: 8822b: disable call trace when write RF mode table fail Chukun Pan
@ 2023-10-13  1:11 ` Ping-Ke Shih
  2023-10-13  2:38   ` Chukun Pan
  0 siblings, 1 reply; 8+ messages in thread
From: Ping-Ke Shih @ 2023-10-13  1:11 UTC (permalink / raw)
  To: Chukun Pan; +Cc: Kalle Valo, linux-wireless, linux-kernel



> -----Original Message-----
> From: Chukun Pan <amadeus@jmu.edu.cn>
> Sent: Thursday, October 12, 2023 10:01 PM
> To: Ping-Ke Shih <pkshih@realtek.com>
> Cc: Kalle Valo <kvalo@kernel.org>; linux-wireless@vger.kernel.org; linux-kernel@vger.kernel.org; Chukun
> Pan <amadeus@jmu.edu.cn>
> Subject: [PATCH 1/1] wifi: rtw88: 8822b: disable call trace when write RF mode table fail
> 
> The rtw88 driver throws a useless Call Trace when the rtl8812bu
> or rtl8822be wifi modules fail to write the RF mode table.

Why do you think this trace is useless? As I see, there is more than one callers.
Did you meet a real case it throws this trace? If yes, how about the frequency?

Ping-Ke


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

* RE: [PATCH 1/1] wifi: rtw88: 8822b: disable call trace when write RF mode table fail
  2023-10-13  1:11 ` Ping-Ke Shih
@ 2023-10-13  2:38   ` Chukun Pan
  2023-10-13  4:23     ` Kalle Valo
  0 siblings, 1 reply; 8+ messages in thread
From: Chukun Pan @ 2023-10-13  2:38 UTC (permalink / raw)
  To: pkshih; +Cc: kvalo, linux-kernel, linux-wireless, Chukun Pan

Hi, Ping-Ke

> Why do you think this trace is useless? As I see, there is more than one callers.
> Did you meet a real case it throws this trace? If yes, how about the frequency?

[  217.651858] ------------[ cut here ]------------
[  217.654813] write RF mode table fail
[  217.657434] WARNING: CPU: 2 PID: 3705 at 0xffffffffa03df3cb [rtw88_8822b@00000000bf0fde9e+0x35000]
[  217.662078] Modules linked in: rtw88_8822ce rtw88_8822c rtw88_8822be rtw88_8822b rtw88_8723de ...
[  217.704412] RIP: 0010:0xffffffffa03df3cb [rtw88_8822b@00000000bf0fde9e+0x35000]
...
[  217.737232] Call Trace:
[  217.738683]  0xffffffffa03df943 [rtw88_8822b@00000000bf0fde9e+0x35000]
[  217.740865]  0xffffffffa0385ab9 [rtw88_core@00000000a8d26f0d+0x1a000]
[  217.742993]  0xffffffffa0279111 [mac80211@000000003cb4b3bd+0x7b000]
[  217.745028]  0xffffffffa0239092 [cfg80211@00000000a951c4b5+0x46000]
[  217.751368]  ? 0xffffffffa0238de0 [cfg80211@00000000a951c4b5+0x46000]
[  217.773278] RIP: 0033:0x7ff0cdf8836c
...
[  217.789457] ---[ end trace 177712424e9eab4a ]---

As you can see this trace above, I don't think it's useful. This
trace throws up a lot of register values but doesn't point out why.
As long as I plug in the rtl8812bu or rtl8822be wifi modules, this
trace will be thrown every time when the rtw88 driver is loaded.

Thanks,
Chukun

-- 
2.25.1


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

* Re: [PATCH 1/1] wifi: rtw88: 8822b: disable call trace when write RF mode table fail
  2023-10-13  2:38   ` Chukun Pan
@ 2023-10-13  4:23     ` Kalle Valo
  2023-10-22  9:09       ` Chukun Pan
  0 siblings, 1 reply; 8+ messages in thread
From: Kalle Valo @ 2023-10-13  4:23 UTC (permalink / raw)
  To: Chukun Pan; +Cc: pkshih, linux-kernel, linux-wireless

Chukun Pan <amadeus@jmu.edu.cn> writes:

> Hi, Ping-Ke
>
>> Why do you think this trace is useless? As I see, there is more than one callers.
>> Did you meet a real case it throws this trace? If yes, how about the frequency?
>
> [  217.651858] ------------[ cut here ]------------
> [  217.654813] write RF mode table fail
> [  217.657434] WARNING: CPU: 2 PID: 3705 at 0xffffffffa03df3cb [rtw88_8822b@00000000bf0fde9e+0x35000]
> [  217.662078] Modules linked in: rtw88_8822ce rtw88_8822c rtw88_8822be rtw88_8822b rtw88_8723de ...
> [  217.704412] RIP: 0010:0xffffffffa03df3cb [rtw88_8822b@00000000bf0fde9e+0x35000]
> ...
> [  217.737232] Call Trace:
> [  217.738683]  0xffffffffa03df943 [rtw88_8822b@00000000bf0fde9e+0x35000]
> [  217.740865]  0xffffffffa0385ab9 [rtw88_core@00000000a8d26f0d+0x1a000]
> [  217.742993]  0xffffffffa0279111 [mac80211@000000003cb4b3bd+0x7b000]
> [  217.745028]  0xffffffffa0239092 [cfg80211@00000000a951c4b5+0x46000]
> [  217.751368]  ? 0xffffffffa0238de0 [cfg80211@00000000a951c4b5+0x46000]
> [  217.773278] RIP: 0033:0x7ff0cdf8836c
> ...
> [  217.789457] ---[ end trace 177712424e9eab4a ]---
>
> As you can see this trace above, I don't think it's useful. This
> trace throws up a lot of register values but doesn't point out why.
> As long as I plug in the rtl8812bu or rtl8822be wifi modules, this
> trace will be thrown every time when the rtw88 driver is loaded.

_Why_ is that warning printed? Are your devices uncalibrated or are they
somehow else special?

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

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

* RE: [PATCH 1/1] wifi: rtw88: 8822b: disable call trace when write RF mode table fail
  2023-10-13  4:23     ` Kalle Valo
@ 2023-10-22  9:09       ` Chukun Pan
  2023-10-23  2:22         ` Ping-Ke Shih
  2023-10-23  8:21         ` Kalle Valo
  0 siblings, 2 replies; 8+ messages in thread
From: Chukun Pan @ 2023-10-22  9:09 UTC (permalink / raw)
  To: kvalo; +Cc: pkshih, linux-kernel, linux-wireless, Chukun Pan

> _Why_ is that warning printed? Are your devices uncalibrated or are they
> somehow else special?

I don't know, but not only my rtl8822be wifi module will have this call trace
every time when the driver probes. This can be considered a common problem.
So I prefer to disable this call trace and use the driver warning instead.

Thanks,
Chukun

-- 
2.25.1


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

* RE: [PATCH 1/1] wifi: rtw88: 8822b: disable call trace when write RF mode table fail
  2023-10-22  9:09       ` Chukun Pan
@ 2023-10-23  2:22         ` Ping-Ke Shih
  2023-10-25  4:01           ` Chukun Pan
  2023-10-23  8:21         ` Kalle Valo
  1 sibling, 1 reply; 8+ messages in thread
From: Ping-Ke Shih @ 2023-10-23  2:22 UTC (permalink / raw)
  To: Chukun Pan, kvalo; +Cc: linux-kernel, linux-wireless



> -----Original Message-----
> From: Chukun Pan <amadeus@jmu.edu.cn>
> Sent: Sunday, October 22, 2023 5:09 PM
> To: kvalo@kernel.org
> Cc: Ping-Ke Shih <pkshih@realtek.com>; linux-kernel@vger.kernel.org; linux-wireless@vger.kernel.org;
> Chukun Pan <amadeus@jmu.edu.cn>
> Subject: RE: [PATCH 1/1] wifi: rtw88: 8822b: disable call trace when write RF mode table fail
> 
> > _Why_ is that warning printed? Are your devices uncalibrated or are they
> > somehow else special?
> 
> I don't know, but not only my rtl8822be wifi module will have this call trace
> every time when the driver probes. This can be considered a common problem.
> So I prefer to disable this call trace and use the driver warning instead.
> 

Except to call trace, rtl8822be works well in your side? If so, you just
worry the verbose trace, right?  

By the way, I tested two hardware version of rtl8822be, and they both are fine.

Ping-Ke 


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

* Re: [PATCH 1/1] wifi: rtw88: 8822b: disable call trace when write RF mode table fail
  2023-10-22  9:09       ` Chukun Pan
  2023-10-23  2:22         ` Ping-Ke Shih
@ 2023-10-23  8:21         ` Kalle Valo
  1 sibling, 0 replies; 8+ messages in thread
From: Kalle Valo @ 2023-10-23  8:21 UTC (permalink / raw)
  To: Chukun Pan; +Cc: pkshih, linux-kernel, linux-wireless

Chukun Pan <amadeus@jmu.edu.cn> writes:

>> _Why_ is that warning printed? Are your devices uncalibrated or are they
>> somehow else special?
>
> I don't know, but not only my rtl8822be wifi module will have this call trace
> every time when the driver probes. This can be considered a common problem.
> So I prefer to disable this call trace and use the driver warning instead.

Why do you say this is a common problem? AFAIK you are the only one
reporting this issue, right? It would help to understand _why_ you are
seeing this, ie. what's the root cause? Just randomly removing warnings
without understanding the root cause is frowned upon.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

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

* Re: [PATCH 1/1] wifi: rtw88: 8822b: disable call trace when write RF mode table fail
  2023-10-23  2:22         ` Ping-Ke Shih
@ 2023-10-25  4:01           ` Chukun Pan
  0 siblings, 0 replies; 8+ messages in thread
From: Chukun Pan @ 2023-10-25  4:01 UTC (permalink / raw)
  To: pkshih; +Cc: kvalo, linux-kernel, linux-wireless, Chukun Pan

> Except to call trace, rtl8822be works well in your side? If so, you just
> worry the verbose trace, right?  

Yes, it's a bit noisy.

> By the way, I tested two hardware version of rtl8822be, and they both are fine.

Sorry wasted your time, but can you test the rtl8812bu wifi module?
Based on the issues search, I'm not the only one who has this problem.
https://github.com/lwfinger/rtw88/issues/111#issuecomment-1385923235
https://github.com/lwfinger/rtw88/issues/151#issuecomment-1753011363

Thanks,
Chukun

-- 
2.25.1


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

end of thread, other threads:[~2023-10-25  4:03 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-12 14:01 [PATCH 1/1] wifi: rtw88: 8822b: disable call trace when write RF mode table fail Chukun Pan
2023-10-13  1:11 ` Ping-Ke Shih
2023-10-13  2:38   ` Chukun Pan
2023-10-13  4:23     ` Kalle Valo
2023-10-22  9:09       ` Chukun Pan
2023-10-23  2:22         ` Ping-Ke Shih
2023-10-25  4:01           ` Chukun Pan
2023-10-23  8:21         ` Kalle Valo

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).