Re: [PATCH 4/5] mmc: core: Add support for graceful host removal for eMMC

From: Ulf Hansson
Date: Fri Mar 28 2025 - 06:22:28 EST


On Fri, 28 Mar 2025 at 09:13, Avri Altman <Avri.Altman@xxxxxxxxxxx> wrote:
>
> > +/*
> > + * Host is being removed. Free up the current card and do a graceful power-
> > off.
> > + */
> > +static void mmc_remove(struct mmc_host *host) {
> > + get_device(&host->card->dev);
> > + mmc_remove_card(host->card);
> > +
> > + _mmc_suspend(host, MMC_POWEROFF_UNBIND);
> Couldn't find how _mmc_suspend handles this new power off flag?

Right. You need to look closer at mmc_may_poweroff_notify() as it
should return false if MMC_POWEROFF_UNBIND, unless
MMC_CAP2_FULL_PWR_CYCLE.

[...]

Kind regards
Uffe