All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: ziniu.wang_1@oss.nxp.com
Cc: Frank.Li@kernel.org, imx@lists.linux.dev
Subject: Re: [PATCH v7 7/8] mmc: sdhci-esdhc-imx: make non-fatal errors non-blocking in suspend
Date: Wed, 15 Jul 2026 07:27:58 +0000	[thread overview]
Message-ID: <20260715072758.EF0DE1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260715071818.272318-8-ziniu.wang_1@oss.nxp.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:

Pre-existing issues:
- [High] The return value of `pm_runtime_force_suspend()` is ignored during system suspend, which can cause a kernel warning and a potential fatal crash on system resume if the suspend operation fails.
--

--- Patch [7]: [PATCH v7 7/8] mmc: sdhci-esdhc-imx: make non-fatal errors non-blocking in suspend ---
commit 343530f069b563d297215c212283dc394ffae3fd
Author: Luke Wang <ziniu.wang_1@nxp.com>

mmc: sdhci-esdhc-imx: make non-fatal errors non-blocking in suspend

This commit modifies the suspend path to ensure that failures from certain
wakeup and pinctrl functions do not block the system suspend process. It
accomplishes this by treating these failures as non-fatal warnings and
always returning success.

> diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
> --- a/drivers/mmc/host/sdhci-esdhc-imx.c
> +++ b/drivers/mmc/host/sdhci-esdhc-imx.c

[ ... ]

> @@ -2108,7 +2107,7 @@ static int sdhci_esdhc_suspend(struct device *dev)
>  	 */
>  	pm_runtime_force_suspend(dev);
>  
> -	return ret;
> +	return 0;
>  }

[Severity: High]
This is a pre-existing issue, but is it safe to ignore the return value of
pm_runtime_force_suspend() here?

If the driver's runtime suspend callback fails (for instance, due to a
cqhci_suspend error), pm_runtime_force_suspend() will return an error and
leave the device in the active state.

By returning 0 regardless of whether pm_runtime_force_suspend() succeeded,
the PM core is led to believe the device suspended successfully. On system
resume, pm_runtime_force_resume() would see the device is still active and
skip calling the runtime_resume callback.

Since the runtime_resume callback enables the clocks, skipping it means the
subsequent call to sdhci_esdhc_imx_hwinit() will attempt to access hardware
registers without clocks enabled. If the power domain was turned off during
sleep, wouldn't this unclocked register access trigger a synchronous external
abort and kernel panic?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260715071818.272318-1-ziniu.wang_1@oss.nxp.com?part=7

  reply	other threads:[~2026-07-15  7:28 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-15  7:18 [PATCH v7 0/8] mmc: sdhci-esdhc-imx: fix SDIO suspend/resume issues ziniu.wang_1
2026-07-15  7:18 ` [PATCH v7 1/8] mmc: sdhci-esdhc-imx: remove unnecessary mmc_card_wake_sdio_irq check for tuning save/restore ziniu.wang_1
2026-07-15  7:29   ` sashiko-bot
2026-07-15  7:18 ` [PATCH v7 2/8] mmc: sdhci-esdhc-imx: restore DLL override for DDR modes on resume ziniu.wang_1
2026-07-15  7:32   ` sashiko-bot
2026-07-15  7:18 ` [PATCH v7 3/8] mmc: sdhci-esdhc-imx: fix esdhc_change_pinstate() to allow default state restore ziniu.wang_1
2026-07-15  7:18 ` [PATCH v7 4/8] mmc: sdhci-esdhc-imx: restore pinctrl before restoring ios timing on resume ziniu.wang_1
2026-07-15  7:32   ` sashiko-bot
2026-07-15  7:18 ` [PATCH v7 5/8] mmc: sdhci-esdhc-imx: disable irq during suspend to fix unhandled interrupt ziniu.wang_1
2026-07-15  7:18 ` [PATCH v7 6/8] mmc: sdhci-esdhc-imx: use pm_runtime_resume_and_get() in suspend ziniu.wang_1
2026-07-15  7:29   ` sashiko-bot
2026-07-15  7:18 ` [PATCH v7 7/8] mmc: sdhci-esdhc-imx: make non-fatal errors non-blocking " ziniu.wang_1
2026-07-15  7:27   ` sashiko-bot [this message]
2026-07-15  7:18 ` [PATCH v7 8/8] mmc: sdhci-esdhc-imx: fix resume error handling ziniu.wang_1
2026-07-15  7:41   ` sashiko-bot
2026-07-15  9:08 ` [PATCH v7 0/8] mmc: sdhci-esdhc-imx: fix SDIO suspend/resume issues Ulf Hansson

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=20260715072758.EF0DE1F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=Frank.Li@kernel.org \
    --cc=imx@lists.linux.dev \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=ziniu.wang_1@oss.nxp.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 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.