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: rtw88: RTL8812BU TX FIFO corruption (?) in USB 3 mode
Date: Fri, 21 Mar 2025 22:14:10 +0200	[thread overview]
Message-ID: <b69f6496-dc12-4662-84ac-aa62d0ceac3f@gmail.com> (raw)

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.

             reply	other threads:[~2025-03-21 20:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-21 20:14 Bitterblue Smith [this message]
2025-03-26  1:44 ` rtw88: RTL8812BU TX FIFO corruption (?) in USB 3 mode Ping-Ke Shih
2025-03-27  0:25   ` Bitterblue Smith

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=b69f6496-dc12-4662-84ac-aa62d0ceac3f@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.