From: Chris Ball <cjb@laptop.org>
To: Daniel Drake <dsd@laptop.org>
Cc: linux-mmc@vger.kernel.org, "Hunter, Adrian" <adrian.hunter@intel.com>
Subject: Re: [PATCH] mmc: sdhci: refine non-removable card checking for card detection
Date: Wed, 18 Apr 2012 19:57:11 -0400 [thread overview]
Message-ID: <8762cwmw4o.fsf@laptop.org> (raw)
In-Reply-To: <20120409231420.B54649D401E@zog.reactivated.net> (Daniel Drake's message of "Tue, 10 Apr 2012 00:14:20 +0100 (BST)")
Hi Dan,
On Mon, Apr 09 2012, Daniel Drake wrote:
> Commit c79396c191bc19703df6eb6bbd0f673ed0df6c9d disables card detection
> where the cards are marked as non-removable.
>
> This makes sense, but the implementation detail of calling
> mmc_card_is_removable() causes some problems, because
> mmc_card_is_removable() is overloaded with CONFIG_MMC_UNSAFE_RESUME
> semantics.
>
> In the OLPC XO case, we need CONFIG_MMC_UNSAFE_RESUME because our root
> filesystem is stored on SD, but we also have external SD card slots
> where we want automatic card detection.
>
> Refine the check to only apply to hosts marked as MMC_CAP_NONREMOVABLE,
> which is defined to mean that the card is *really* nonremovable. This
> could be revisited in future if we find a way to improve
> CONFIG_MMC_UNSAFE_RESUME semantics.
>
> Signed-off-by: Daniel Drake <dsd@laptop.org>
> ---
> drivers/mmc/host/sdhci.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> index 9aa77f3..ccefdeb 100644
> --- a/drivers/mmc/host/sdhci.c
> +++ b/drivers/mmc/host/sdhci.c
> @@ -147,7 +147,7 @@ static void sdhci_set_card_detection(struct sdhci_host *host, bool enable)
> u32 present, irqs;
>
> if ((host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION) ||
> - !mmc_card_is_removable(host->mmc))
> + (host->mmc->caps & MMC_CAP_NONREMOVABLE))
> return;
>
> present = sdhci_readl(host, SDHCI_PRESENT_STATE) &
Thanks, pushed to mmc-next for 3.4 with Chuanxiao's ACK.
- Chris.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
prev parent reply other threads:[~2012-04-18 23:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-09 23:14 [PATCH] mmc: sdhci: refine non-removable card checking for card detection Daniel Drake
2012-04-10 8:05 ` Sascha Silbe
2012-04-17 14:48 ` Daniel Drake
2012-04-13 4:53 ` Dong, Chuanxiao
2012-04-18 23:57 ` Chris Ball [this message]
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=8762cwmw4o.fsf@laptop.org \
--to=cjb@laptop.org \
--cc=adrian.hunter@intel.com \
--cc=dsd@laptop.org \
--cc=linux-mmc@vger.kernel.org \
/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.