From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Avri Altman <Avri.Altman@sandisk.com>,
"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>,
Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
"linux-renesas-soc@vger.kernel.org"
<linux-renesas-soc@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/5] mmc: core: Further avoid re-storing power to the eMMC before a shutdown
Date: Tue, 1 Apr 2025 08:51:09 +0200 [thread overview]
Message-ID: <Z-uM3aRHJ_8bwu0W@shikoro> (raw)
In-Reply-To: <CAPDyKFqW92wJ9P5cyO0vcV14dU5Q-JRGR=oKOS362crFy6y2Pw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1754 bytes --]
Hi Ulf,
> mmc_card_can_poweroff_notify() would not be consistent with all the
> other mmc_can_* helpers, so I rather stay with
> mmc_can_poweroff_notify(), for now. If you think a rename makes sense,
> I suggest we do that as a follow up and rename all the helpers.
I vageuly recall that the commit I mentioned below (renaming hw_reset to
card_hw_reset) should have been a start to do exactly this, renaming
more of the helpers. I drifted away. Yet, I still think this would make
MMC core code a lot easier to understand. I'll work on it today, timing
seems good with rc1 on the horizon...
> mmc_host_can_poweroff_notify() seems fine to me!
Great!
> > I do understand that. I don't see why this needs a change in the
> > existing logic as Alan pointed out above.
>
> Aha. I get your point now. As stated in the commit message:
>
> Due to an earlier suspend request the eMMC may already have been properly
> powered-off, hence we are sometimes leaving the eMMC in its current state.
> However, in one case when the host has MMC_CAP2_FULL_PWR_CYCLE_IN_SUSPEND
> set we may unnecessarily restore the power to the eMMC, let's avoid this.
Oookay, now I see what you are aiming at. It seems I got the PWR_CYCLE
flags wrong? I thought MMC_CAP2_FULL_PWR_CYCLE_IN_SUSPEND is only a
subset of MMC_CAP2_FULL_PWR_CYCLE. The former can do the power cycles
only in suspend, while the latter can do them in suspend and shutdown.
So, in my thinking, full power cycle might also have the eMMC
powered-off during shutdown. This is wrong?
> Let me try to clarify the commit message a bit with this information.
Whatever is the final outcome, it needs a comment in the code, I am
quite sure.
Happy hacking,
Wolfram
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2025-04-01 6:51 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-20 14:00 [PATCH 0/5] mmc: core: Add support for graceful host removal for eMMC/SD Ulf Hansson
2025-03-20 14:00 ` [PATCH 1/5] mmc: core: Convert mmc_can_poweroff_notify() into a bool Ulf Hansson
2025-03-28 13:39 ` Avri Altman
2025-03-31 8:14 ` Wolfram Sang
2025-03-20 14:00 ` [PATCH 2/5] mmc: core: Further avoid re-storing power to the eMMC before a shutdown Ulf Hansson
2025-03-28 13:55 ` Avri Altman
2025-03-31 8:21 ` Wolfram Sang
2025-03-31 9:13 ` Ulf Hansson
2025-03-31 10:46 ` Wolfram Sang
2025-03-31 12:06 ` Ulf Hansson
2025-04-01 6:51 ` Wolfram Sang [this message]
2025-04-01 11:50 ` Ulf Hansson
2025-03-20 14:00 ` [PATCH 3/5] mmc: core: Convert into an enum for the poweroff-type for eMMC Ulf Hansson
2025-03-31 8:22 ` Wolfram Sang
2025-03-20 14:00 ` [PATCH 4/5] mmc: core: Add support for graceful host removal " Ulf Hansson
2025-03-28 8:13 ` Avri Altman
2025-03-28 10:21 ` Ulf Hansson
2025-03-31 8:27 ` Wolfram Sang
2025-03-31 8:23 ` Wolfram Sang
2025-03-20 14:00 ` [PATCH 5/5] mmc: core: Add support for graceful host removal for SD Ulf Hansson
2025-03-31 8:30 ` Wolfram Sang
2025-04-01 8:50 ` Wolfram Sang
2025-04-01 8:51 ` Wolfram Sang
2025-04-01 11:51 ` Ulf Hansson
2025-03-20 15:50 ` [PATCH 0/5] mmc: core: Add support for graceful host removal for eMMC/SD Wolfram Sang
2025-03-31 8:32 ` Wolfram Sang
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-uM3aRHJ_8bwu0W@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox