From: sashiko-bot@kernel.org
To: "Kamal Dasu" <kamal.dasu@broadcom.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v12 3/6] mmc: core: Add option to keep an eMMC powered on at system suspend
Date: Wed, 11 Nov 2026 21:59:58 +0000 [thread overview]
Message-ID: <sashiko-outbox-209729@kernel.org> (raw)
In-Reply-To: <20261111194426.1652644-4-kamal.dasu@broadcom.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] mmc: core: CQE left active in _mmc_suspend() on
MMC_NO_POWEROFF_SUSPEND
--
commit 719eca51e9b0da2d046fb99b21cbf5ff86d8cbfe
Author: Ulf Hansson <ulf.hansson@oss.qualcomm.com>
mmc: core: Add option to keep an eMMC powered on at system suspend
This commit adds support for keeping an eMMC powered on during system
suspend when MMC_PM_KEEP_POWER is set, introducing MMC_NO_POWEROFF_SUSPEND
to skip power-off and keep the card active on resume.
> diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
> index a02b04938e1a0..c936272bcd813 100644
> --- a/drivers/mmc/core/mmc.c
> +++ b/drivers/mmc/core/mmc.c
[ ... ]
> @@ -2157,6 +2158,15 @@ static int _mmc_suspend(struct mmc_host *host, enum mmc_poweroff_type pm_type)
> goto out;
> }
>
> + if (pm_type == MMC_NO_POWEROFF_SUSPEND) {
> + if (host->retune_period) {
> + mmc_retune_timer_stop(host);
> + mmc_retune_needed(host);
> + }
> + mmc_card_set_suspended(host->card);
> + goto out;
> + }
[Severity: Medium]
Can this leave CQE active across suspend when _mmc_flush_cache() returns
without sending a command (for example, when the eMMC cache is disabled)?
The existing _mmc_suspend() paths turn off CQE either by issuing a legacy
command via __mmc_start_request() or by calling mmc_power_off() ->
mmc_set_initial_state(). With MMC_NO_POWEROFF_SUSPEND, if
_mmc_flush_cache() is a no-op, _mmc_suspend() returns with host->cqe_on
still true and CQHCI unhalted. When the host driver later runs
cqhci_suspend() -> cqhci_deactivate() -> __cqhci_disable(), CQHCI_ENABLE
and host->cqe_on are cleared without calling cqhci_off() or
cq_host->ops->disable(), so later legacy commands and resume paths also
skip host->cqe_ops->cqe_off(host), leaving CQE controller state active and
breaking non-CQE commands after resume.
Should this path call host->cqe_ops->cqe_off(host) when host->cqe_on is
set?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261111194426.1652644-1-kamal.dasu@broadcom.com?part=3
next prev parent reply other threads:[~2026-11-11 21:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-11 19:44 [PATCH v12 0/6] mmc: core: Keep the card powered across suspend when firmware needs it live Kamal Dasu
2026-11-11 19:44 ` [PATCH v12 1/6] dt-bindings: mmc: Extend keep-power-in-suspend beyond SDIO Kamal Dasu
2026-11-11 19:44 ` [PATCH v12 2/6] dt-bindings: mmc: Add reset-card-at-resume property Kamal Dasu
2026-11-11 19:44 ` [PATCH v12 3/6] mmc: core: Add option to keep an eMMC powered on at system suspend Kamal Dasu
2026-11-11 21:59 ` sashiko-bot [this message]
2026-11-11 19:44 ` [PATCH v12 4/6] mmc: core: Split sdio_set_host_pm_flags() Kamal Dasu
2026-11-11 19:44 ` [PATCH v12 5/6] mmc: core: Move and split reset functions for eMMC Kamal Dasu
2026-11-11 19:44 ` [PATCH v12 6/6] mmc: core: Add support for resetting an eMMC at system resume Kamal Dasu
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-209729@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=kamal.dasu@broadcom.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox