]> git.baikalelectronics.ru Git - kernel.git/commit
mmc: sdhci: refine non-removable card checking for card detection
authorDaniel Drake <dsd@laptop.org>
Mon, 9 Apr 2012 23:14:20 +0000 (00:14 +0100)
committerChris Ball <cjb@laptop.org>
Sat, 21 Apr 2012 00:44:25 +0000 (20:44 -0400)
commit21e0890437b54c6b85a42ecf2653d48297240312
treea421538909a9649bdb595fc74c6dbe664432a247
parentd3483203b7e6dec0d71d9be7d66e6ceea4ec9320
mmc: sdhci: refine non-removable card checking for card detection

Commit d3302ca0fded8b ("mmc: sdhci: prevent card detection activity
for non-removable cards") 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>
Acked-by: Chuanxiao Dong <chuanxiao.dong@intel.com>
[stable@: please apply to 3.3-stable]
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/host/sdhci.c