RE: [PATCH] wifi: rtw88: pci: Power off MAC and disable interrupts on shutdown
From: Ping-Ke Shih
Date: Fri Nov 27 2026 - 02:11:47 EST
꧁Swapnil Shinde꧂ <shindeswapnil028@xxxxxxxxx> wrote:
> Hi Ping-Ke,
>
> Thank you for the review and suggestion.
>
> I tested calling rtw_enter_ips(rtwdev) under rtwdev->mutex in
> rtw_pci_shutdown() (with EXPORT_SYMBOL(rtw_enter_ips) added in ps.c,
> running alongside the companion btusb shutdown/autosuspend fix) on my
> RTL8723DE laptop:
>
> - Cold boot: Wi-Fi and Bluetooth both work.
> - Warm reboot #1 (Wi-Fi ON, Bluetooth ON): Both Wi-Fi and Bluetooth work.
> - Warm reboot #2 (Bluetooth toggled OFF mid-session, Wi-Fi ON): Both
> Wi-Fi and Bluetooth work cleanly (no -16 MAC power-on timeout or -71
> USB enumeration error).
Good to hear that.
>
> Using rtw_enter_ips() is indeed much cleaner than manually clearing the
> internal flags and calling rtw_power_off(), and it also notifies BT
> coex via COEX_IPS_ENTER before entering PCI_D3hot.
>
> Regarding commits 05202746ed70 and 44492e70adc8:
> - 05202746ed70 sets BIT_USB_SUS_DIS in REG_HCI_OPT_CTRL, which does not
> power off the Wi-Fi MAC before 44492e70adc8 transitions the device to
> PCI_D3hot—leaving REG_APS_FSMCO active across warm reset (-EBUSY).
So both or either one commit don't help?
> - Calling rtw_enter_ips() right before pci_set_power_state(pdev, PCI_D3hot)
> cleanly resolves that while keeping both commits intact.
>
> Would you like me to send a [PATCH v2] that exports rtw_enter_ips() in
> ps.c and calls it from rtw_pci_shutdown() in pci.c?
If this is the only way to fix, please.
---
pw-bot: cr