Re: [PATCH v2] wifi: rtw89: pci: add .shutdown callback to stop rfkill polling on reboot
Ping-Ke Shih <[email protected]> Sun, 2 Aug 2026 09:28:08 +0800
| Newsgroups | org.kernel.vger.linux-wireless,org.kernel.vger.linux-kernel,org.kernel.vger.stable |
|---|---|
| Message-ID | <[email protected]> |
[email protected] wrote: > From: "Yuhang.chen" <[email protected]> > > Since the hardware rfkill polling was introduced, arm64 platforms can > panic with an asynchronous SError during warm reboot: > > SError Interrupt on CPU8, code 0x00000000be000011 -- SError > Workqueue: events_power_efficient rfkill_poll [rfkill] > rtw89_pci_ops_read8+0x94/0x160 [rtw89_pci] > rtw89_core_rfkill_poll+0x50/0x1e0 [rtw89_core] > rtw89_ops_rfkill_poll+0x40/0x68 [rtw89_core] > ieee80211_rfkill_poll+0x3c/0x70 [mac80211] > cfg80211_rfkill_poll+0x40/0x2a0 [cfg80211] > rfkill_poll+0x30/0x88 [rfkill] > Kernel panic - not syncing: Asynchronous SError Interrupt > > On the reboot path the kernel only runs device_shutdown(), which calls > each driver's .shutdown callback; .remove is not invoked. The rtw89 PCI > driver had no .shutdown callback, so nothing stopped the rfkill polling > work while the platform was tearing the PCIe link down. Once the link > is gone, the next MMIO read from the poll handler targets a > non-responding device and is reported as a fatal asynchronous SError on > arm64. > > Add rtw89_pci_shutdown(), wired to all rtw89 PCI device drivers, which > sets a new RTW89_FLAG_SHUTDOWN flag (mirroring the USB > RTW89_FLAG_UNPLUGGED pattern). When the flag is set, > rtw89_ops_rfkill_poll() returns early, so no MMIO read is issued to the > chip after shutdown begins and the SError no longer occurs. > > This does not call the full .remove path from .shutdown, to keep the > shutdown handler minimal and avoid running the non-idempotent teardown > twice. > > Fixes: 0b38e6277aed ("wifi: rtw89: add support for hardware rfkill") > Cc: [email protected] > Suggested-by: Ping-Ke Shih <[email protected]> > Signed-off-by: Yuhang.chen <[email protected]> > Acked-by: Ping-Ke Shih <[email protected]> 1 patch(es) applied to rtw-next branch of rtw.git, thanks. 667c12782aaf wifi: rtw89: pci: add .shutdown callback to stop rfkill polling on reboot --- https://github.com/pkshih/rtw.git