mmc: allow upper layers to know immediately if card has been removed
authorChuanxiao Dong <chuanxiao.dong@intel.com>
Thu, 8 Dec 2011 09:10:27 +0000 (17:10 +0800)
committerbuildbot <buildbot@intel.com>
Mon, 26 Dec 2011 10:56:00 +0000 (02:56 -0800)
commite0415e31a39d0608a31f306d70095fdc7da93807
tree0e79793e0bc068068785209e591c42ffb2005c63
parent1ab5e37530ade35101531129d71713c4ab20f0f4
mmc: allow upper layers to know immediately if card has been removed

BZ: 18012

[PORT FROM UPSTREAM]

Add a function mmc_detect_card_removed() which upper layers can use to
determine immediately if a card has been removed. This function should
be called after an I/O request fails so that all queued I/O requests
can be errored out immediately instead of waiting for the card device
to be removed.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Acked-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
Change-Id: I3b602d69e0cc3c5a49245a35adcd227d849103b9
Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com>
Reviewed-on: http://android.intel.com:8080/29373
Reviewed-by: Tang, Richard <richard.tang@intel.com>
Tested-by: Sun, Jianhua <jianhua.sun@intel.com>
Reviewed-by: Zayet, AymenX <aymenx.zayet@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
drivers/mmc/core/core.c
drivers/mmc/core/core.h
drivers/mmc/core/mmc.c
drivers/mmc/core/sd.c
drivers/mmc/core/sdio.c
include/linux/mmc/card.h
include/linux/mmc/core.h
include/linux/mmc/host.h