All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
To: Ping-Ke Shih <pkshih@realtek.com>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: Re: rtw88: RTL8812BU TX FIFO corruption (?) in USB 3 mode
Date: Thu, 27 Mar 2025 02:25:54 +0200	[thread overview]
Message-ID: <7034ab1a-68e2-4cc3-9d2a-e0c6adf20ca9@gmail.com> (raw)
In-Reply-To: <91456392399d4bb5b7b96cbe35a6b17c@realtek.com>

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.


      reply	other threads:[~2025-03-27  0:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

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=7034ab1a-68e2-4cc3-9d2a-e0c6adf20ca9@gmail.com \
    --to=rtl8821cerfe2@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=pkshih@realtek.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.