mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ping-Ke Shih <pkshih@realtek.com>
To: <yhchen312@gmail.com>, <pkshih@realtek.com>
Cc: <damon.chen@realtek.com>, <linux-wireless@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, Yuhang.chen <yhchen312@gmail.com>,
	<stable@vger.kernel.org>
Subject: Re: [PATCH v2] wifi: rtw89: pci: add .shutdown callback to stop rfkill polling on reboot
Date: Sun, 2 Aug 2026 09:28:08 +0800	[thread overview]
Message-ID: <2f9366ea-d5c1-48fe-9bb7-ad7ea5520c37@RTKEXHMBS06.realtek.com.tw> (raw)
In-Reply-To: <20260729014142.2746777-1-yhchen312@gmail.com>

yhchen312@gmail.com wrote:

> From: "Yuhang.chen" <yhchen312@gmail.com>
> 
> 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: stable@vger.kernel.org
> Suggested-by: Ping-Ke Shih <pkshih@realtek.com>
> Signed-off-by: Yuhang.chen <yhchen312@gmail.com>
> Acked-by: Ping-Ke Shih <pkshih@realtek.com>

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


      parent reply	other threads:[~2026-08-02  1:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-28  1:54 [PATCH] wifi: rtw89: 8852be: add .shutdown callback to quiesce device " yhchen312
2026-07-28  2:45 ` Ping-Ke Shih
2026-07-29  1:35   ` yhchen312
2026-07-29  6:53     ` Ping-Ke Shih
2026-07-29  1:41   ` [PATCH v2] wifi: rtw89: pci: add .shutdown callback to stop rfkill polling " yhchen312
2026-07-29  6:52     ` Ping-Ke Shih
2026-08-02  1:28     ` Ping-Ke Shih [this message]

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=2f9366ea-d5c1-48fe-9bb7-ad7ea5520c37@RTKEXHMBS06.realtek.com.tw \
    --to=pkshih@realtek.com \
    --cc=damon.chen@realtek.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=yhchen312@gmail.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

all inboxes | Powered by JetHome®