summaryrefslogtreecommitdiffstats
path: root/include/linux/mmc
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@stericsson.com>2012-02-06 10:42:39 +0100
committerChris Ball <cjb@laptop.org>2012-03-27 12:19:58 -0400
commitf0cc9cf99326926fd76f77645c48d16d647802eb (patch)
tree62ad1c9e51cb27c797acaa5481d93a4306125bcd /include/linux/mmc
parent885c3e800cf99db3391247776bfa2d262b21a72b (diff)
downloadlinux-f0cc9cf99326926fd76f77645c48d16d647802eb.tar.gz
linux-f0cc9cf99326926fd76f77645c48d16d647802eb.tar.bz2
linux-f0cc9cf99326926fd76f77645c48d16d647802eb.zip
mmc: core: Detect card removal on I/O error
To prevent I/O as soon as possible at card removal, a new detect work is re-scheduled without a delay to let a rescan remove the card device as soon as possible. Additionally, MMC_CAP2_DETECT_ON_ERR can now be used to handle "slowly" removed cards that a scheduled detect work did not detect as removed. To prevent further I/O requests for these lingering removed cards, check if card has been removed and then schedule a detect work to properly remove it. Signed-off-by: Ulf Hansson <ulf.hansson@stericsson.com> Reviewed-by: Namjae Jeon <linkinjeon@gmail.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'include/linux/mmc')
-rw-r--r--include/linux/mmc/host.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index ee2b0363c040..d1d3743fde90 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -258,6 +258,7 @@ struct mmc_host {
#define MMC_CAP2_HS200 (MMC_CAP2_HS200_1_8V_SDR | \
MMC_CAP2_HS200_1_2V_SDR)
#define MMC_CAP2_BROKEN_VOLTAGE (1 << 7) /* Use the broken voltage */
+#define MMC_CAP2_DETECT_ON_ERR (1 << 8) /* On I/O err check card removal */
mmc_pm_flag_t pm_caps; /* supported pm features */
unsigned int power_notify_type;