All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: linux-mmc@vger.kernel.org,
	Adrian Hunter <adrian.hunter@intel.com>,
	Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
	Avri Altman <Avri.Altman@sandisk.com>,
	linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/5] mmc: core: Further avoid re-storing power to the eMMC before a shutdown
Date: Tue, 8 Apr 2025 10:09:41 +0200	[thread overview]
Message-ID: <Z_TZxXORT8H99qv4@shikoro> (raw)
In-Reply-To: <20250407152759.25160-3-ulf.hansson@linaro.org>

[-- Attachment #1: Type: text/plain, Size: 897 bytes --]


> @@ -2187,11 +2198,12 @@ static int mmc_shutdown(struct mmc_host *host)
>  	int err = 0;
>  
>  	/*
> -	 * In a specific case for poweroff notify, we need to resume the card
> -	 * before we can shutdown it properly.
> +	 * If the card remains suspended at this point and it was done by using
> +	 * the sleep-cmd (CMD5), we may need to re-initialize it first, to allow
> +	 * us to send the preferred poweroff-notification cmd at shutdown.
>  	 */
>  	if (mmc_can_poweroff_notify(host->card) &&
> -		!(host->caps2 & MMC_CAP2_FULL_PWR_CYCLE))
> +	    !mmc_host_can_poweroff_notify(host, true))

Ooookay, I think I got this logic now. I think it makes sense to make it
more explicit in the comment, though:

"This is then the case when the card is able to handle poweroff
notifications in general but the host could not initiate those for
suspend."

Something like this?


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2025-04-08  8:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-07 15:27 [PATCH v2 0/5] mmc: core: Add support for graceful host removal for eMMC/SD Ulf Hansson
2025-04-07 15:27 ` [PATCH v2 1/5] mmc: core: Convert mmc_can_poweroff_notify() into a bool Ulf Hansson
2025-04-07 15:27 ` [PATCH v2 2/5] mmc: core: Further avoid re-storing power to the eMMC before a shutdown Ulf Hansson
2025-04-08  8:09   ` Wolfram Sang [this message]
2025-04-08 12:40     ` Ulf Hansson
2025-04-08 15:07       ` Wolfram Sang
2025-04-09 13:13         ` Ulf Hansson
2025-04-09 14:46           ` Wolfram Sang
2025-04-07 15:27 ` [PATCH v2 3/5] mmc: core: Convert into an enum for the poweroff-type for eMMC Ulf Hansson
2025-04-07 15:27 ` [PATCH v2 4/5] mmc: core: Add support for graceful host removal " Ulf Hansson
2025-04-07 15:27 ` [PATCH v2 5/5] mmc: core: Add support for graceful host removal for SD 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=Z_TZxXORT8H99qv4@shikoro \
    --to=wsa+renesas@sang-engineering.com \
    --cc=Avri.Altman@sandisk.com \
    --cc=adrian.hunter@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=ulf.hansson@linaro.org \
    --cc=yoshihiro.shimoda.uh@renesas.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.