All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Waldemar Rymarkiewicz" <external.Waldemar.Rymarkiewicz@bshg.com>
Cc: devicetree@vger.kernel.org, imx@lists.linux.dev, robh@kernel.org,
	conor+dt@kernel.org, Frank.Li@kernel.org
Subject: Re: [PATCH 2/2] arm64: dts: imx8mn-bsh-smm-s2/pro: keep SDIO Wi-Fi powered during suspend
Date: Wed, 25 Nov 2026 09:59:05 +0000	[thread overview]
Message-ID: <sashiko-outbox-233084@kernel.org> (raw)
In-Reply-To: <20261125094825.3873696-3-external.Waldemar.Rymarkiewicz@bshg.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] arm64: dts: imx8mn-bsh-smm-s2: cap-power-off-card defeats
  keep-power-in-suspend
--

commit 088cbe9bdf022869f185b3a15de5fbebcc1d6394
Author: Michael Trimarchi <michael@amarulasolutions.com>

arm64: dts: imx8mn-bsh-smm-s2/pro: keep SDIO Wi-Fi powered during suspend

This commit adds the keep-power-in-suspend property to the usdhc2 node on
the i.MX8MN BSH SMM S2 and S2 PRO boards.

> diff --git a/arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2-common.dtsi b/arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2-common.dtsi
> index 8dee56299cff4..917ef96774988 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2-common.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2-common.dtsi
> @@ -264,6 +264,7 @@ &usdhc2 {
>  	bus-width = <4>;
>  	non-removable;
>  	cap-power-off-card;
> +	keep-power-in-suspend;

[Severity: Medium]
Does leaving cap-power-off-card set on usdhc2 prevent
keep-power-in-suspend from keeping the brcmfmac SDIO Wi-Fi card powered
across suspend?

keep-power-in-suspend only sets MMC_PM_KEEP_POWER in host->pm_caps, while
mmc_sdio_suspend() checks host->pm_flags, which must be requested by the
SDIO function driver on each suspend.  In brcmfmac:

drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c:brcmf_ops_sdio_suspend() {
	...
	cap_power_off = !!(func->card->host->caps & MMC_CAP_POWER_OFF_CARD);
	...
	if (sdiodev->wowl_enabled || !cap_power_off) {
		...
		sdio_flags = MMC_PM_KEEP_POWER;
		...
		return sdio_set_host_pm_flags(sdiodev->func1, sdio_flags);
	} else {
		/* power will be cut so remove device, probe again in resume */
		brcmf_sdiod_intr_unregister(sdiodev);
		err = brcmf_sdiod_remove(sdiodev);
		...
	}
}

Because cap-power-off-card sets MMC_CAP_POWER_OFF_CARD, any suspend where
WoWLAN is not enabled takes the else branch, removes the device without
setting MMC_PM_KEEP_POWER in host->pm_flags, and causes
mmc_sdio_suspend() to cut card power and re-initialize the module on
resume.  Should cap-power-off-card be removed here?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261125094825.3873696-1-external.Waldemar.Rymarkiewicz@bshg.com?part=2

      reply	other threads:[~2026-11-25  9:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-25  9:48 [PATCH 0/2] arm64: dts: imx8mn-bsh-smm-s2/pro: improve SDIO Wi-Fi power management Waldemar Rymarkiewicz
2026-11-25  9:48 ` [PATCH 1/2] arm64: dts: imx8mn-bsh-smm-s2/pro: allow powering off SDIO Wi-Fi card Waldemar Rymarkiewicz
2026-11-25  9:48 ` [PATCH 2/2] arm64: dts: imx8mn-bsh-smm-s2/pro: keep SDIO Wi-Fi powered during suspend Waldemar Rymarkiewicz
2026-11-25  9:59   ` sashiko-bot [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=sashiko-outbox-233084@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=Frank.Li@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=external.Waldemar.Rymarkiewicz@bshg.com \
    --cc=imx@lists.linux.dev \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.