From: Chris Ball <cjb@laptop.org>
To: Dmitry Shmidt <dimitrysh@android.com>
Cc: linux-mmc@vger.kernel.org, Nicolas Pitre <nico@fluxnic.net>
Subject: Re: mmc_rescan failure in case of CONFIG_MMC_UNSAFE_RESUME
Date: Mon, 14 Feb 2011 19:40:13 +0000 [thread overview]
Message-ID: <20110214194013.GA3145@void.printf.net> (raw)
In-Reply-To: <AANLkTimkW0JDUT-8ERrGTimLUpqWvgNd5jYLfuXodL==@mail.gmail.com>
Hi Dmitry,
[Cc += Nico]
On Mon, Feb 14, 2011 at 11:04:13AM -0800, Dmitry Shmidt wrote:
> MMC_UNSAFE_RESUME is affecting mmc_sdio_resume() sequence. If it is
> not defined then sdio card will be considered
> "removable" and on resume mmc_sdio_init_card() will be always called.
>
> static int mmc_sdio_resume(struct mmc_host *host)
> {
> ...
> if (mmc_card_is_removable(host) || !mmc_card_is_powered_resumed(host))
> err = mmc_sdio_init_card(host, host->ocr, host->card,
> (host->pm_flags & MMC_PM_KEEP_POWER));
mmc_sdio_init_card() is supposed to be called if your card is removable,
because the card might have changed. It has a fast path that's enabled
by MMC_PM_KEEP_POWER. (Nicolas explained this back in October.)
You absolutely should not enable MMC_UNSAFE_RESUME if your host has a
removable card. It's an awful hack, and you just found an example of
where it breaks.
If you need mmc_sdio_resume() to have an even faster path for you, we can
talk about that and see if it makes sense. Misusing MMC_UNSAFE_RESUME to
get a powered SDIO resume is just wrong.
Thanks,
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
next prev parent reply other threads:[~2011-02-14 19:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-12 0:33 mmc_rescan failure in case of CONFIG_MMC_UNSAFE_RESUME Dmitry Shmidt
2011-02-12 17:22 ` Chris Ball
2011-02-14 19:04 ` Dmitry Shmidt
2011-02-14 19:40 ` Chris Ball [this message]
2011-02-14 21:54 ` Dmitry Shmidt
2011-02-15 18:06 ` Dmitry Shmidt
2011-02-16 17:37 ` Dmitry Shmidt
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=20110214194013.GA3145@void.printf.net \
--to=cjb@laptop.org \
--cc=dimitrysh@android.com \
--cc=linux-mmc@vger.kernel.org \
--cc=nico@fluxnic.net \
/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