public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
To: LB F <goainwo@gmail.com>
Cc: Ping-Ke Shih <pkshih@realtek.com>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [BUG] wifi: rtw88: Hard system freeze on RTL8821CE when power_save is enabled (LPS/ASPM conflict)
Date: Sat, 28 Mar 2026 20:52:15 +0200	[thread overview]
Message-ID: <a5ea6373-8c07-4fcd-95fc-d87ce6aef6d5@gmail.com> (raw)
In-Reply-To: <CALdGYqRkX8=XMOePeauxvSTDZFLEYyJZKCtoxCzqaNwdO6BNnw@mail.gmail.com>

On 28/03/2026 15:40, LB F wrote:
> Hi Bitterblue,
> 
> Thank you for the quick feedback. Full dmesg from the current boot
> session is attached (dmesg_boot0_clean.txt, 332K, 3349 lines).
> 
> It contains all 76 "unused phy status page" events with both hex
> dumps (4-byte grouped and byte-level) in full, plus all surrounding
> kernel context.
> 
> The interesting observation you made about the MAC addresses being
> 24 bytes lower than expected is very helpful — I hadn't noticed the
> offset discrepancy. If you need the adapter and AP MAC addresses
> for reference:
> 
>   Adapter: 8c:c8:4b:68:d1:63
>   AP:      6c:68:a4:1c:97:5b
> 
> And yes, adding a NULL check in rtw_fw_adaptivity_result() seems
> like a good defensive measure regardless of the root cause.
> 
> Let me know if you need anything else or a different format.
> 
> Best regards,
> Oleksandr Havrylov

I made a mistake with the second print_hex_dump. It was supposed to
print from rxdesc + 56. But not to worry, I think this is sufficient.

Some of the frames have what looks like a valid PHY status at byte 24:

[ 9926.365048] cachyos-x8664 kernel: rtw_8821ce 0000:13:00.0: unused phy status page (7)
[ 9926.365451] cachyos-x8664 kernel: 00000000: 05da26ac b587f0af 0aa2e765 f48d78f5  .&......e....x..
[ 9926.365475] cachyos-x8664 kernel: 00000010: 3ffe9e00 49d11a5c 00002701 012a0000  ...?\..I.'....*.
[ 9926.365496] cachyos-x8664 kernel: 00000020: 00000014 20000000 000000e2 0000000a  ....... ........
[ 9926.365537] cachyos-x8664 kernel: 00000030: 0000001c 00000000                    ........

But RTW_RX_DESC_W0_SHIFT is not 0. Then rtw88 looks for the PHY
status in the wrong place, in this case at byte 25. The official
driver always looks for it at byte 24:

https://github.com/lwfinger/rtw88/blob/master/alt_rtl8821ce/hal/rtl8821c/pci/rtl8821ce_recv.c#L272

Unfortunately fixing that won't be enough.

The way rtw88 configures the chip, RTW_RX_DESC_W0_DRV_INFO_SIZE is
supposed to be either 0 or 4, but in these frames it has many other
values.

In this case:

[ 9986.214022] cachyos-x8664 kernel: rtw_8821ce 0000:13:00.0: unused phy status page (2)
[ 9986.214512] cachyos-x8664 kernel: 00000000: 95515588 50ad66d1 893f252f 77ef35ae  .UQ..f.P/%?..5.w
[ 9986.214544] cachyos-x8664 kernel: 00000010: 3ffe1e00 4d626889 00404288 684bc88c  ...?.hbM.B@...Kh
[ 9986.214572] cachyos-x8664 kernel: 00000020: 686c63d1 5b971ca4 1ca4686c 73205a97  .clh...[lh...Z s
[ 9986.214599] cachyos-x8664 kernel: 00000030: 4a670000 000b2000                    ..gJ. ..

the 802.11 header immediately follows the RX descriptor (there is
no PHY status, which is not unusual) but RTW_RX_DESC_W0_PHYST is 1.

In station mode RTW_RX_DESC_W1_MACID is supposed to be 0 or 1 (I think),
mostly 0. In these frames it has many other values.

RTW_RX_DESC_W0_PKT_LEN sometimes exceeds 11454. In one case it's 0.

In many of these frames bytes 25..31 don't look like a PHY status
or 802.11 header.

If we can't find the reason for these weird frames, maybe the best
way to filter them out is to check RTW_RX_DESC_W0_DRV_INFO_SIZE.
It takes care of 67 out of the 76 weird frames in dmesg_boot0_clean.txt.

  reply	other threads:[~2026-03-28 18:52 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-09 21:48 [BUG] wifi: rtw88: Hard system freeze on RTL8821CE when power_save is enabled (LPS/ASPM conflict) LB F
2026-03-10  2:02 ` Ping-Ke Shih
2026-03-10 11:01   ` LB F
2026-03-10 15:12     ` LB F
2026-03-11  2:20       ` Ping-Ke Shih
2026-03-11  2:15     ` Ping-Ke Shih
2026-03-11  2:22       ` Ping-Ke Shih
2026-03-11 11:00         ` LB F
2026-03-11 15:22           ` LB F
2026-03-12  1:56             ` Ping-Ke Shih
2026-03-12 21:42               ` LB F
2026-03-13  0:03                 ` LB F
2026-03-13  0:29                   ` LB F
2026-03-14 10:52                     ` LB F
2026-03-14 12:39                       ` LB F
2026-03-15  0:24                         ` LB F
2026-03-16  2:55                           ` Ping-Ke Shih
2026-03-16 20:27                             ` LB F
2026-03-17  1:28                               ` Ping-Ke Shih
2026-03-18  0:00                                 ` LB F
2026-03-18  0:58                                   ` Ping-Ke Shih
2026-03-18 23:55                                     ` LB F
2026-03-19  0:22                                       ` LB F
2026-03-19  0:49                                         ` Ping-Ke Shih
2026-03-19  1:24                                       ` Ping-Ke Shih
2026-03-19 23:58                                         ` LB F
2026-03-20  0:41                                           ` LB F
2026-03-20  1:00                                             ` Ping-Ke Shih
2026-03-20  1:19                                               ` LB F
2026-03-20  2:02                                                 ` Ping-Ke Shih
2026-03-21 12:07                                                   ` LB F
2026-03-23  2:01                                                     ` Ping-Ke Shih
2026-03-25 20:38                                                       ` LB F
2026-03-26 23:52                                                         ` LB F
2026-03-27 10:52                                                           ` Bitterblue Smith
2026-03-28 11:41                                                             ` LB F
2026-03-28 13:07                                                               ` Bitterblue Smith
2026-03-28 13:40                                                                 ` LB F
2026-03-28 18:52                                                                   ` Bitterblue Smith [this message]
2026-03-28 20:59                                                                     ` LB F
2026-03-28 21:31                                                                       ` LB F
2026-03-28 21:53                                                                         ` LB F
2026-03-30  1:23                                                                     ` Ping-Ke Shih
2026-03-30 11:34                                                                       ` LB F
2026-03-16  2:50                         ` Ping-Ke Shih

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=a5ea6373-8c07-4fcd-95fc-d87ce6aef6d5@gmail.com \
    --to=rtl8821cerfe2@gmail.com \
    --cc=goainwo@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox