rtw88: WiFi card is not offloaded properly when suspending the OS

Giovanni Santini <[email protected]>
Newsgroups dev.linux.lists.regressions,org.kernel.vger.linux-wireless,org.kernel.vger.stable
Message-ID <[email protected]>
Hello everyone,

This is my second time contacting the kernel team for issues, so I am 
quite inexperienced at this. Feel free to redirect me to other places if 
needed.

I have an issue which I can replicate consistently in both latest stable 
and mainline kernel.

The behaviour is the following:

1. Suspend my laptop

2. Resume the laptop

3. Wifi card is in a corrupt state

In the logs, this is the pattern:


Jun 02 17:25:33 archlinux-tug kernel: rtw88_8822ce 0000:03:00.0: failed 
to send h2c command
Jun 02 17:25:33 archlinux-tug kernel: rtw88_8822ce 0000:03:00.0: failed 
to send h2c command
Jun 02 17:25:33 archlinux-tug kernel: rtw88_8822ce 0000:03:00.0: failed 
to send h2c command
Jun 02 17:25:33 archlinux-tug kernel: rtw88_8822ce 0000:03:00.0: failed 
to send h2c command
Jun 02 17:25:36 archlinux-tug kernel: rtw88_8822ce 0000:03:00.0: failed 
to poll offset=0x5 mask=0x2 value=0x0
Jun 02 17:25:36 archlinux-tug kernel: ------------[ cut here ]------------
Jun 02 17:25:36 archlinux-tug kernel: failed to read DBI register, 
addr=0x0719
Jun 02 17:25:36 archlinux-tug kernel: WARNING: 
drivers/net/wireless/realtek/rtw88/pci.c:1280 at 
rtw_dbi_read8.constprop.0+0xdd/0x130 [rtw88_pci], CPU#12: 
kworker/u66:0/151135
Jun 02 17:25:36 archlinux-tug kernel: Modules linked in: rfcomm 
snd_seq_dummy snd_hrtimer snd_seq nf_conntrack_netbios_ns 
nf_conntrack_broadcast ccm hid_sensor_custom uhid cmac algif_hash 
algif_skcipher af_alg nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib 
nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct 
nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 bnep 
btusb uvcvideo btmtk btrtl videobuf2_vmalloc uvc btbcm videobuf2_memops 
btintel videobuf2_v4l2 videobuf2_common bluetooth videodev nf_tables 
nfnetlink snd_sof_amd_acp70 snd_sof_amd_acp63 snd_sof_amd_vangogh 
snd_sof_amd_rembrandt snd_sof_amd_renoir snd_sof_amd_acp snd_sof_pci 
snd_sof_xtensa_dsp snd_sof snd_sof_utils snd_pci_ps 
snd_soc_acpi_amd_match snd_soc_acpi_amd_sdca_quirks snd_amd_sdw_acpi 
soundwire_amd soundwire_generic_allocation soundwire_bus snd_soc_sdca 
snd_soc_core snd_compress ac97_bus snd_pcm_dmaengine snd_rpl_pci_acp6x 
snd_acp_pci snd_amd_acpi_mach snd_acp_legacy_common snd_pci_acp6x 
snd_pci_acp5x snd_rn_pci_acp3x snd_acp_config snd_soc_acpi
Jun 02 17:25:36 archlinux-tug kernel:  snd_pci_acp3x cdc_mbim cdc_wdm 
cdc_ncm cdc_ether usbnet hid_sensor_hub intel_rapl_msr amd_atl 
snd_hda_codec_alc269 intel_rapl_common snd_hda_codec_realtek_lib 
snd_hda_scodec_component snd_hda_codec_atihdmi snd_hda_codec_nvhdmi 
rtw88_8822ce snd_hda_codec_generic snd_hda_codec_hdmi rtw88_8822c 
snd_hda_intel snd_usb_audio kvm_amd rtw88_pci snd_hda_codec joydev 
snd_usbmidi_lib rtw88_core ccp r8152 mousedev snd_hda_core snd_ump 
asus_nb_wmi snd_intel_dspcfg mii r8169 snd_rawmidi asus_armoury 
snd_intel_sdw_acpi kvm mac80211 ucsi_acpi ucsi_ccg snd_hwdep 
snd_seq_device firmware_attributes_class ee1004 hid_multitouch snd_pcm 
typec_ucsi mc asus_wmi irqbypass realtek vfat nvidia_drm(OE) ntfs3 fat 
roles nvidia_modeset(OE) sp5100_tco snd_timer mdio_devres 
platform_profile typec cfg80211 i2c_hid_acpi ghash_clmulni_intel libphy 
aesni_intel sparse_keymap snd i2c_piix4 rfkill wmi_bmof rapl 
acpi_cpufreq pcspkr k10temp i2c_smbus soundcore libarc4 mdio_bus 
i2c_nvidia_gpu thunderbolt asus_wireless i2c_hid nvidia_uvm(OE)
Jun 02 17:25:36 archlinux-tug kernel:  mac_hid nvidia(OE) i2c_dev 
pkcs8_key_parser crypto_user amdgpu amdxcp i2c_algo_bit drm_ttm_helper 
ttm drm_exec drm_panel_backlight_quirks gpu_sched nvme 
drm_suballoc_helper nvme_core uas drm_buddy usb_storage nvme_keyring 
drm_display_helper video nvme_auth cec hkdf wmi serio_raw
Jun 02 17:25:36 archlinux-tug kernel: CPU: 12 UID: 0 PID: 151135 Comm: 
kworker/u66:0 Tainted: G           OE       7.0.10-arch1-1 #1 
PREEMPT(full)  b38726df0ec1c5aec6f05d4eab858505a5944d02
Jun 02 17:25:36 archlinux-tug kernel: Tainted: [O]=OOT_MODULE, 
[E]=UNSIGNED_MODULE
Jun 02 17:25:36 archlinux-tug kernel: Hardware name: ASUSTeK COMPUTER 
INC. ASUS TUF Gaming A15 FA506IV_FX506IV/FA506IV, BIOS FA506IV.320 
06/01/2022
Jun 02 17:25:36 archlinux-tug kernel: Workqueue: events_unbound 
cfg80211_wiphy_work [cfg80211]
Jun 02 17:25:36 archlinux-tug wpa_supplicant[1719]: wlan0: 
CTRL-EVENT-DISCONNECTED bssid=f2:09:0d:87:eb:1a reason=4 locally_generated=1
Jun 02 17:25:36 archlinux-tug kernel: RIP: 
0010:rtw_dbi_read8.constprop.0+0xe2/0x130 [rtw88_pci]
Jun 02 17:25:36 archlinux-tug wpa_supplicant[1719]: wlan0: Added BSSID 
f2:09:0d:87:eb:1a into ignore list, ignoring for 10 seconds
Jun 02 17:25:36 archlinux-tug kernel: Code: 75 66 48 8b 85 a8 a3 00 00 
8a 80 ed 03 00 00 41 88 04 24 31 c0 5b 5d 41 5c e9 4a a8 72 d9 48 8d 3d 
43 b2 92 ff be 19 07 00 00 <67> 48 0f b9 3a b8 fb ff ff ff 5b 5d 41 5c 
e9 2b a8 72 d9 ba 18 07
Jun 02 17:25:36 archlinux-tug wpa_supplicant[1719]: wlan0: BSSID 
f2:09:0d:87:eb:1a ignore list count incremented to 2, ignoring for 10 
seconds
Jun 02 17:25:36 archlinux-tug kernel: RSP: 0018:ffffcee219d1bbe0 EFLAGS: 
00010246
Jun 02 17:25:36 archlinux-tug kernel: RAX: 00000ea861c12436 RBX: 
0000000000000000 RCX: 000000000000000c
Jun 02 17:25:36 archlinux-tug kernel: RDX: 0000000000007bd1 RSI: 
0000000000000719 RDI: ffffffffc2f51020
Jun 02 17:25:36 archlinux-tug kernel: RBP: ffff8a843f4b2080 R08: 
0000000000000000 R09: ffffffff9e05fb60
Jun 02 17:25:36 archlinux-tug kernel: R10: ffffcee219d1b950 R11: 
ffffcee219d1b948 R12: ffffcee219d1bc17
Jun 02 17:25:36 archlinux-tug kernel: R13: ffff8a843f4b0960 R14: 
ffff8a84406c5b80 R15: 0000000000000000
Jun 02 17:25:36 archlinux-tug kernel: FS:  0000000000000000(0000) 
GS:ffff8a8b70c67000(0000) knlGS:0000000000000000
Jun 02 17:25:36 archlinux-tug kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 
0000000080050033
Jun 02 17:25:36 archlinux-tug kernel: CR2: 00007f791f276368 CR3: 
00000006b79bb000 CR4: 0000000000350ef0
Jun 02 17:25:36 archlinux-tug kernel: Call Trace:
Jun 02 17:25:36 archlinux-tug kernel:  <TASK>
Jun 02 17:25:36 archlinux-tug kernel: rtw_pci_link_ps.part.0+0x91/0xd0 
[rtw88_pci 1874ce56c3660d46c85688c0264a191491512ebd]
Jun 02 17:25:36 archlinux-tug kernel:  rtw_enter_ips+0x44/0x50 
[rtw88_core a8e0bcdfab5b64ab357d3ebe7ac0f7897dc7ded7]
Jun 02 17:25:36 archlinux-tug kernel:  rtw_ops_config+0xb2/0xc0 
[rtw88_core a8e0bcdfab5b64ab357d3ebe7ac0f7897dc7ded7]
Jun 02 17:25:36 archlinux-tug kernel:  drv_config+0x2f/0x110 [mac80211 
175a9206f8e30d4333850f3926bccbfd9d4ff3a6]
Jun 02 17:25:36 archlinux-tug kernel:  ? 
__ieee80211_recalc_idle+0xfb/0x150 [mac80211 
175a9206f8e30d4333850f3926bccbfd9d4ff3a6]
Jun 02 17:25:36 archlinux-tug kernel: ieee80211_del_chanctx+0x14b/0x160 
[mac80211 175a9206f8e30d4333850f3926bccbfd9d4ff3a6]
Jun 02 17:25:36 archlinux-tug kernel:  ? 
ieee80211_assign_link_chanctx+0x267/0x490 [mac80211 
175a9206f8e30d4333850f3926bccbfd9d4ff3a6]
Jun 02 17:25:36 archlinux-tug kernel: ieee80211_free_chanctx+0xe2/0x160 
[mac80211 175a9206f8e30d4333850f3926bccbfd9d4ff3a6]
Jun 02 17:25:36 archlinux-tug kernel: 
__ieee80211_link_release_channel+0x1a8/0x250 [mac80211 
175a9206f8e30d4333850f3926bccbfd9d4ff3a6]
Jun 02 17:25:36 archlinux-tug kernel: ieee80211_set_disassoc+0x470/0x900 
[mac80211 175a9206f8e30d4333850f3926bccbfd9d4ff3a6]
Jun 02 17:25:36 archlinux-tug kernel:  ? skb_dequeue+0x5d/0x80
Jun 02 17:25:36 archlinux-tug kernel: 
ieee80211_sta_connection_lost+0x5b/0xe0 [mac80211 
175a9206f8e30d4333850f3926bccbfd9d4ff3a6]
Jun 02 17:25:36 archlinux-tug kernel:  ? 
ieee80211_iface_work+0x16b/0x650 [mac80211 
175a9206f8e30d4333850f3926bccbfd9d4ff3a6]
Jun 02 17:25:36 archlinux-tug kernel: cfg80211_wiphy_work+0x14c/0x1f0 
[cfg80211 7e781c2986480c73afbb6fda28d86a566a2a291f]
Jun 02 17:25:36 archlinux-tug kernel: process_one_work+0x19c/0x3a0
Jun 02 17:25:36 archlinux-tug kernel:  worker_thread+0x1b1/0x310
Jun 02 17:25:36 archlinux-tug kernel:  ? __pfx_worker_thread+0x10/0x10
Jun 02 17:25:36 archlinux-tug kernel:  kthread+0xe1/0x120
Jun 02 17:25:36 archlinux-tug kernel:  ? __pfx_kthread+0x10/0x10
Jun 02 17:25:36 archlinux-tug kernel:  ret_from_fork+0x2bc/0x350
Jun 02 17:25:36 archlinux-tug kernel:  ? __pfx_kthread+0x10/0x10
Jun 02 17:25:36 archlinux-tug kernel:  ret_from_fork_asm+0x1a/0x30
Jun 02 17:25:36 archlinux-tug kernel:  </TASK>
Jun 02 17:25:36 archlinux-tug kernel: ---[ end trace 0000000000000000 ]---


I'm attaching the full boot log, if you need a fresh one I can provide it.

I run ArchLinux with KDE Plasma, for networking I use NetworkManager and 
wpa_supplicant.

If you would like me to run tests with e.g. just iwd I can do so, just 
let me know what setup you would like me to have.

I do not have this issue with the LTS kernel 6.18.34. This affects 7.0 
and 7.1.
I believe this issue was not present in < 7 kernels, but I cannot guarantee.
I can however downgrade to previous kernels to understand where the 
issue was introduced.

My kernel is packaged from the Arch team; for mainline, I this package 
from the AUR: https://aur.archlinux.org/packages/linux-mainline

My kernel has no custom modification; I do have the NVIDIA and 
vl42loopback drivers set up via DKMS.

Let me know if I can provide any additional information.

Bests,


-- 
Giovanni Santini
kernel_report.log (text/x-log, 731.4 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.