mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ping-Ke Shih <pkshih@realtek.com>
To: "yhchen312@gmail.com" <yhchen312@gmail.com>
Cc: Damon Chen <damon.chen@realtek.com>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: RE: [PATCH v2] wifi: rtw89: pci: add .shutdown callback to stop rfkill polling on reboot
Date: Wed, 29 Jul 2026 06:52:51 +0000	[thread overview]
Message-ID: <1c11e1e5c94b4a80835df4c5bafb55ea@realtek.com> (raw)
In-Reply-To: <20260729014142.2746777-1-yhchen312@gmail.com>

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>



  reply	other threads:[~2026-07-29  6:52 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 [this message]
2026-08-02  1:28     ` Ping-Ke Shih

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=1c11e1e5c94b4a80835df4c5bafb55ea@realtek.com \
    --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®