Re: [PATCH v2] wifi: rtw88: pci: Enter IPS before PCI_D3hot on shutdown
From: ꧁Swapnil Shinde꧂
Date: Tue Dec 01 2026 - 05:10:49 EST
Hi Ping-Ke,
Thank you very much for reviewing and applying this patch to rtw-next.
Update: Extended testing showed that no rtw88 changes are needed, fixing
drivers/bluetooth/btusb.c alone resolves all issues cleanly (rtw88
changes are not needed in v3).
After sending v2, I ran extended stress tests across cold boots, warm
reboots, and runtime radio toggles on my RTL8723DE (10ec:d723 / 0bda:b009)
combo card. Since rtw-next has not been pulled upstream yet, I wanted to
transparently share the full picture so you can decide whether to keep
or drop 28f426f4ef94:
1. Root cause isolated strictly to drivers/bluetooth/btusb.c (no rtw88
changes needed):
With stock rtw88 (leaving rtw_pci_shutdown() and ps.c completely
untouched), modifying only drivers/bluetooth/btusb.c (.shutdown handler
+ usb_disable_autosuspend() + HCI_QUIRK_NON_PERSISTENT_SETUP) fixes all
warm-reboot hangs and runtime toggle issues 100% of tested scenarios
passed without touching any rtw88 files.
2. Edge cases observed during extended testing with v2:
1- Dual-radio OFF drop (when rtw_enter_ips() is in rtw_pci_shutdown()):
When 28f426f4ef94 is active alongside the btusb changes, normal
boots, consecutive warm reboots, and single-radio toggles all work
fine. However, if a user performs:
Cold boot -> Warm reboot -> Turn BOTH Wi-Fi and BT OFF
both interfaces drop out immediately upon turning both OFF
(Bluetooth disconnects from USB and Wi-Fi ON/OFF switch becomes
unresponsive until the next reboot):
rtw88_8723de 0000:02:00.0: failed to poll offset=0x5 mask=0x3 value=0x0
rtw88_8723de 0000:02:00.0: mac power on failed
usb 1-6: device not accepting address 7, error -71
With stock rtw88 (no rtw88 modifications), turning both Wi-Fi and
Bluetooth OFF after a warm reboot passes repeatedly without dropping
either interface.
2- Bluetooth UI toggle freeze (BT OFF -> wait >2s -> BT ON):
Without HCI_QUIRK_NON_PERSISTENT_SETUP on the btusb side, toggling
Bluetooth OFF mid-session and back ON left the Bluetooth adapter
frozen (Opcode 0x202f failed: -38) until reloading btusb. Adding
HCI_QUIRK_NON_PERSISTENT_SETUP in btusb_probe() resolved that cleanly.
3. Full logs, test matrix, and current btusb-only patch details:
I documented the full investigation, dmesg logs, and test matrix here:
https://github.com/sudo-WearTherinG/linux-rtl8723de-driver-patch
I leave it completely up to your judgment whether 28f426f4ef94 is still
worth keeping in rtw-next for general rtw88 PCI shutdown cleanliness or
better dropped so rtw88 stays untouched on RTL8723DE.
V3 doesn't require any rtw88 changes and works completely fine with only
btusb.c modified.
Thanks again for your time and guidance!
Best regards,
Swapnil