* rtw88: RTL8812BU TX FIFO corruption (?) in USB 3 mode
@ 2025-03-21 20:14 Bitterblue Smith
2025-03-26 1:44 ` Ping-Ke Shih
0 siblings, 1 reply; 3+ messages in thread
From: Bitterblue Smith @ 2025-03-21 20:14 UTC (permalink / raw)
To: Ping-Ke Shih; +Cc: linux-wireless@vger.kernel.org
Hi,
I ran into a problem with the RTL8812BU. If I load it a bit in USB 3
mode, like with "iperf3 -c 192.168.0.1 -R -t 60" the connection often
stops working. It may take a few tries. It still receives beacons but
the AP can't be pinged anymore.
Looking at the registers with
"watch cat /sys/kernel/debug/ieee80211/phy*/rtw88/mac_2", I noticed
the high half of register 0x240 was steadily increasing.
Register 0x240 is called REG_FIFOPAGE_INFO_5. The driver writes the
number of pages allocated to the public queue into the low half.
The high half indicates the number of pages currently available.
The number of available pages was steadily increasing, beyond the
total number of pages:
00000240 072b070b 0003fa00 0003fe00 0003fa60
00000240 0737070b 0003fa00 0003fe00 0003fa60
00000240 073b070b 0003fa00 0003fe00 0003fa60
00000240 0741070b 0003fa00 0003fe00 0003fa60
00000240 0741070b 0003fa00 0003fe00 0003fa60
00000240 074f070b 0003fa00 0003fe00 0003fa60
00000240 075d070b 0003fa00 0003fe00 0003fa60
Normal values when the device is functional (and idle):
00000240 070b070b 0003fa00 0003fe00 0003fa60
When register 0x240 has strange values, register 0x210
(REG_TXDMA_STATUS) has the value 5. Normally register 0x210 is 0.
All this only happens in USB 3 mode. Everything is fine in USB 2 mode.
I tried to disable USB RX and TX aggregation, SUPPORTS_AMSDU_IN_AMPDU,
and TX_AMSDU. None of that helped.
This problem happens also with this driver:
https://github.com/morrownr/88x2bu-20210702
and with v5.13.1.1-1-g6f2541ef2.20240507_COEX20220812-18317b7b. I see
the same strange values in register 0x240 in
/proc/net/rtl88x2bu/wlp3s0f3u4/mac_reg_dump.
My test device is TP-Link Archer T3U Plus, with USB ID 2357:0138.
My system is Lenovo Ideapad 3 15ADA6 with AMD Athlon Gold 3150U CPU.
Can this be fixed somehow? I saw the other drivers have some code in
rtw_sreset.c to power off and on the device when register 0x210 is
non-zero, but that seems suboptimal.
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: rtw88: RTL8812BU TX FIFO corruption (?) in USB 3 mode
2025-03-21 20:14 rtw88: RTL8812BU TX FIFO corruption (?) in USB 3 mode Bitterblue Smith
@ 2025-03-26 1:44 ` Ping-Ke Shih
2025-03-27 0:25 ` Bitterblue Smith
0 siblings, 1 reply; 3+ messages in thread
From: Ping-Ke Shih @ 2025-03-26 1:44 UTC (permalink / raw)
To: Bitterblue Smith; +Cc: linux-wireless@vger.kernel.org
Bitterblue Smith <rtl8821cerfe2@gmail.com> wrote:
> Hi,
>
> I ran into a problem with the RTL8812BU. If I load it a bit in USB 3
> mode, like with "iperf3 -c 192.168.0.1 -R -t 60" the connection often
> stops working. It may take a few tries. It still receives beacons but
> the AP can't be pinged anymore.
>
> Looking at the registers with
> "watch cat /sys/kernel/debug/ieee80211/phy*/rtw88/mac_2", I noticed
> the high half of register 0x240 was steadily increasing.
>
> Register 0x240 is called REG_FIFOPAGE_INFO_5. The driver writes the
> number of pages allocated to the public queue into the low half.
> The high half indicates the number of pages currently available.
> The number of available pages was steadily increasing, beyond the
> total number of pages:
>
> 00000240 072b070b 0003fa00 0003fe00 0003fa60
> 00000240 0737070b 0003fa00 0003fe00 0003fa60
> 00000240 073b070b 0003fa00 0003fe00 0003fa60
> 00000240 0741070b 0003fa00 0003fe00 0003fa60
> 00000240 0741070b 0003fa00 0003fe00 0003fa60
> 00000240 074f070b 0003fa00 0003fe00 0003fa60
> 00000240 075d070b 0003fa00 0003fe00 0003fa60
>
> Normal values when the device is functional (and idle):
>
> 00000240 070b070b 0003fa00 0003fe00 0003fa60
>
> When register 0x240 has strange values, register 0x210
> (REG_TXDMA_STATUS) has the value 5. Normally register 0x210 is 0.
>
> All this only happens in USB 3 mode. Everything is fine in USB 2 mode.
I checked with internal USB team. The USB 3 mode can only work on 5GHz,
because electrical interference between USB 3 clock and WiFi 2.4 GHz
band. Could you check if it works on 5GHz?
>
> I tried to disable USB RX and TX aggregation, SUPPORTS_AMSDU_IN_AMPDU,
> and TX_AMSDU. None of that helped.
>
> This problem happens also with this driver:
> https://github.com/morrownr/88x2bu-20210702
> and with v5.13.1.1-1-g6f2541ef2.20240507_COEX20220812-18317b7b.
By default, it only supports USB 2 mode. Have you changed the driver?
> I see
> the same strange values in register 0x240 in
> /proc/net/rtl88x2bu/wlp3s0f3u4/mac_reg_dump.
>
> My test device is TP-Link Archer T3U Plus, with USB ID 2357:0138.
> My system is Lenovo Ideapad 3 15ADA6 with AMD Athlon Gold 3150U CPU.
>
> Can this be fixed somehow? I saw the other drivers have some code in
> rtw_sreset.c to power off and on the device when register 0x210 is
> non-zero, but that seems suboptimal.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: rtw88: RTL8812BU TX FIFO corruption (?) in USB 3 mode
2025-03-26 1:44 ` Ping-Ke Shih
@ 2025-03-27 0:25 ` Bitterblue Smith
0 siblings, 0 replies; 3+ messages in thread
From: Bitterblue Smith @ 2025-03-27 0:25 UTC (permalink / raw)
To: Ping-Ke Shih; +Cc: linux-wireless@vger.kernel.org
On 26/03/2025 03:44, Ping-Ke Shih wrote:
> Bitterblue Smith <rtl8821cerfe2@gmail.com> wrote:
>> Hi,
>>
>> I ran into a problem with the RTL8812BU. If I load it a bit in USB 3
>> mode, like with "iperf3 -c 192.168.0.1 -R -t 60" the connection often
>> stops working. It may take a few tries. It still receives beacons but
>> the AP can't be pinged anymore.
>>
>> Looking at the registers with
>> "watch cat /sys/kernel/debug/ieee80211/phy*/rtw88/mac_2", I noticed
>> the high half of register 0x240 was steadily increasing.
>>
>> Register 0x240 is called REG_FIFOPAGE_INFO_5. The driver writes the
>> number of pages allocated to the public queue into the low half.
>> The high half indicates the number of pages currently available.
>> The number of available pages was steadily increasing, beyond the
>> total number of pages:
>>
>> 00000240 072b070b 0003fa00 0003fe00 0003fa60
>> 00000240 0737070b 0003fa00 0003fe00 0003fa60
>> 00000240 073b070b 0003fa00 0003fe00 0003fa60
>> 00000240 0741070b 0003fa00 0003fe00 0003fa60
>> 00000240 0741070b 0003fa00 0003fe00 0003fa60
>> 00000240 074f070b 0003fa00 0003fe00 0003fa60
>> 00000240 075d070b 0003fa00 0003fe00 0003fa60
>>
>> Normal values when the device is functional (and idle):
>>
>> 00000240 070b070b 0003fa00 0003fe00 0003fa60
>>
>> When register 0x240 has strange values, register 0x210
>> (REG_TXDMA_STATUS) has the value 5. Normally register 0x210 is 0.
>>
>> All this only happens in USB 3 mode. Everything is fine in USB 2 mode.
>
> I checked with internal USB team. The USB 3 mode can only work on 5GHz,
> because electrical interference between USB 3 clock and WiFi 2.4 GHz
> band. Could you check if it works on 5GHz?
>
Thank you for taking this to them.
It doesn't work on 5 GHz. I was already using my 5 GHz network on
channel 100.
>>
>> I tried to disable USB RX and TX aggregation, SUPPORTS_AMSDU_IN_AMPDU,
>> and TX_AMSDU. None of that helped.
>>
>> This problem happens also with this driver:
>> https://github.com/morrownr/88x2bu-20210702
>> and with v5.13.1.1-1-g6f2541ef2.20240507_COEX20220812-18317b7b.
>
> By default, it only supports USB 2 mode. Have you changed the driver?
>
I did not change the driver. I set the module parameter
rtw_switch_usb_mode to 1. It makes the driver switch to USB 3 mode.
I forgot to say that I also tested Windows 10 with the driver from
TP-Link (I think). I tried alternating upload tests and download
tests over and over, I left iperf3 running for many minutes. It was
very difficult to make it fail. I think only one time iperf3
reported 0 speed for a few seconds but it recovered by itself.
I don't know how to examine the hardware registers (0x210, 0x240)
in Windows, so I can't say for sure that the problem doesn't happen
there. But it looks much better than in Linux. It was definitely
in USB 3 mode, the speeds were 500-600 Mbps.
>> I see
>> the same strange values in register 0x240 in
>> /proc/net/rtl88x2bu/wlp3s0f3u4/mac_reg_dump.
>>
>> My test device is TP-Link Archer T3U Plus, with USB ID 2357:0138.
>> My system is Lenovo Ideapad 3 15ADA6 with AMD Athlon Gold 3150U CPU.
>>
>> Can this be fixed somehow? I saw the other drivers have some code in
>> rtw_sreset.c to power off and on the device when register 0x210 is
>> non-zero, but that seems suboptimal.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-03-27 0:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-21 20:14 rtw88: RTL8812BU TX FIFO corruption (?) in USB 3 mode Bitterblue Smith
2025-03-26 1:44 ` Ping-Ke Shih
2025-03-27 0:25 ` Bitterblue Smith
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).