Re: [PATCH] mmc: sdhci: refine non-removable card checking for card detection |
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
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@xxxxxxxxxx>
> ---
> 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@xxxxxxxxxx> <http://printf.net/>
One Laptop Per Child
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Linux USB Devel]
[Video for Linux]
[Linux Audio Users]
[Photo]
[Yosemite News]
[Yosemite Photos]
[Free Online Dating]
[Linux Kernel]
[Linux SCSI]
[XFree86]