Linux wireless drivers development
 help / color / mirror / Atom feed
From: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
To: "André Valentin" <avalentin@marcant.net>,
	"Jeff Johnson" <jjohnson@kernel.org>
Cc: linux-wireless@vger.kernel.org, ath11k@lists.infradead.org,
	Kalle Valo <kvalo@kernel.org>,
	stable@vger.kernel.org,
	Manikanta Pubbisetty <manikanta.pubbisetty@oss.qualcomm.com>
Subject: Re: [PATCH v2] wifi: ath11k: run ahb shutdown() teardown only on WCN6750
Date: Mon, 10 Aug 2026 12:05:32 -0700	[thread overview]
Message-ID: <33165600-be3b-4faa-aef9-97c0b56e36de@oss.qualcomm.com> (raw)
In-Reply-To: <20260808213551.4169863-1-avalentin@marcant.net>

On 8/8/2026 2:35 PM, André Valentin wrote:
> The AHB shutdown() callback was added solely for WCN6750, which must stop
> DMA before the SMMU is torn down at system reboot/shutdown. It was
> registered unconditionally in the shared
> ath11k_ahb_driver, so it also runs on the IPQ AHB targets (IPQ8074/
> IPQ6018/IPQ5018), which never had a shutdown() handler before and have no
> such SMMU requirement.
> 
> The commit message claimed the change "will not impact other AHB ath11k
> devices", but it does: on IPQ6018 the teardown stops the WCSS Q6 remote
> processor firmware, which leaves shared WCSS state such that the boot ROM
> hangs during DDR training on the following warm reset -- only a cold
> (power-on) reset recovers, so a plain reboot never comes back and needs a
> physical power cycle. This was pinned by bisecting the teardown: skipping
> ath11k_qmi_firmware_stop() (i.e. not stopping the Q6) is what lets the
> warm reset train DDR and boot normally, whereas none of the q6v5 power,
> reset or clock steps reproduce it on their own.
> 
> Restrict the shutdown() teardown to WCN6750 via hw_params, restoring the
> pre-regression behaviour for the IPQ AHB targets: they simply have no
> shutdown() teardown again, exactly as they did for years before that
> change, and on reboot/shutdown the SoC reset re-initializes the WCSS from
> scratch. WCN6750 keeps the teardown. Module removal (rmmod / remove()) is
> unchanged for all targets.
> 
> Verified on a MikroTik Chateau 5G R17 ax (IPQ6018): before, a plain
> reboot froze in the boot ROM during DDR training; after, it trains DDR
> and boots the kernel across repeated reboots.
> 
> Fixes: ac41c2b642b1 ("wifi: ath11k: Register shutdown handler for WCN6750")
> Cc: stable@vger.kernel.org
> Cc: Manikanta Pubbisetty <manikanta.pubbisetty@oss.qualcomm.com>
> Signed-off-by: André Valentin <avalentin@marcant.net>
> ---
> Changes in v2 (per Jeff Johnson's review):
> - Drive the difference from hw_params instead of comparing ab->hw_rev in
>   ath11k_ahb_shutdown(): add shutdown_teardown, set only for WCN6750.
> - Frame it as restoring the pre-regression behaviour for the IPQ AHB
>   targets (no shutdown() teardown), rather than a per-SoC quirk.
> 
> v1: https://lore.kernel.org/linux-wireless/20260807094858.1548216-1-avalentin@marcant.net/
> 
>  drivers/net/wireless/ath/ath11k/ahb.c  | 11 +++++++++++
>  drivers/net/wireless/ath/ath11k/core.c |  1 +
>  drivers/net/wireless/ath/ath11k/hw.h   |  4 ++++
>  3 files changed, 16 insertions(+)
> 
> diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/ath/ath11k/ahb.c
> index 1e1dea4..5d71ff4 100644
> --- a/drivers/net/wireless/ath/ath11k/ahb.c
> +++ b/drivers/net/wireless/ath/ath11k/ahb.c
> @@ -1288,6 +1288,17 @@ static void ath11k_ahb_shutdown(struct platform_device *pdev)
>  	 * remove() is invoked during rmmod & shutdown() during
>  	 * system reboot/shutdown.
>  	 */
> +
> +	/* The teardown below is only needed on WCN6750 (stop DMA before the

1) incorrect block comment style, /* should be on a line by itself
(at one time networking had a different style, but no longer)

2) we avoid mentioning hardware in generic code. that is the whole point of
the hw_params. mention the feature not the specific hardware (since there may
be hw other than WCN6750 that have this behavior)

> +	 * SMMU is torn down). It was registered for all AHB targets, but on
> +	 * the IPQ SoCs it stops the WCSS Q6 firmware and leaves shared state
> +	 * that hangs the boot ROM during DDR training on the next warm reset;
> +	 * they never had a shutdown() teardown before and the SoC reset
> +	 * re-initializes the WCSS from scratch, so skip it there.
> +	 */
> +	if (!ab->hw_params.shutdown_teardown)
> +		return;
> +
>  	ath11k_ahb_remove_prepare(ab);
>  
>  	if (!(test_bit(ATH11K_FLAG_REGISTERED, &ab->dev_flags)))
> diff --git a/drivers/net/wireless/ath/ath11k/core.c b/drivers/net/wireless/ath/ath11k/core.c
> index 8dacc87..c6df829 100644
> --- a/drivers/net/wireless/ath/ath11k/core.c
> +++ b/drivers/net/wireless/ath/ath11k/core.c
> @@ -578,6 +578,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
>  	{
>  		.name = "wcn6750 hw1.0",
>  		.hw_rev = ATH11K_HW_WCN6750_HW10,
> +		.shutdown_teardown = true,

please add = false to all other records
we enforce explicitly initializing all members

>  		.fw = {
>  			.dir = "WCN6750/hw1.0",
>  			.board_size = 256 * 1024,
> diff --git a/drivers/net/wireless/ath/ath11k/hw.h b/drivers/net/wireless/ath/ath11k/hw.h
> index 4996536..8279eb4 100644
> --- a/drivers/net/wireless/ath/ath11k/hw.h
> +++ b/drivers/net/wireless/ath/ath11k/hw.h
> @@ -231,6 +231,10 @@ struct ath11k_hw_params {
>  	bool cfr_support;
>  	u32 cfr_num_stream_bufs;
>  	u32 cfr_stream_buf_size;
> +	/* run the ahb shutdown() teardown; only WCN6750 needs it, to stop

again wrong block comment style, and should not have an explicit chip
reference. describe the behavior, not which chipsets have that behavior.
only the hw_params initializer should establish the correlation of the
feature/behavior to the chipset

> +	 * DMA before the SMMU is torn down at reboot/shutdown
> +	 */
> +	bool shutdown_teardown;
>  };
>  
>  struct ath11k_hw_ops {
> 
> base-commit: f9a2394a23482bfd330911e9c8295b71724feacd


  reply	other threads:[~2026-08-10 19:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-07  9:48 [PATCH] wifi: ath11k: run ahb shutdown() teardown only on WCN6750 André Valentin
2026-08-07 15:34 ` Jeff Johnson
2026-08-07 15:39   ` Jeff Johnson
2026-08-08 21:35 ` [PATCH v2] " André Valentin
2026-08-10 19:05   ` Jeff Johnson [this message]
2026-08-10 19:28   ` [PATCH v3] " André Valentin
2026-08-21  6:50     ` André Valentin

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=33165600-be3b-4faa-aef9-97c0b56e36de@oss.qualcomm.com \
    --to=jeff.johnson@oss.qualcomm.com \
    --cc=ath11k@lists.infradead.org \
    --cc=avalentin@marcant.net \
    --cc=jjohnson@kernel.org \
    --cc=kvalo@kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=manikanta.pubbisetty@oss.qualcomm.com \
    --cc=stable@vger.kernel.org \
    /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