mmc: msm_sdcc: detect card removal on I/O error
This change defines MMC_CAP2_DETECT_ON_ERR cap which will
let MMC core layer to detect card removal on any I/O error.
If this cap is not enabled, MMC block layer will keep
throwing the I/O errors for all the requests in MMC block
queue.
Change-Id: I3c4795783d1b37ca95aa946ea8d25dee4eed1902
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
diff --git a/drivers/mmc/host/msm_sdcc.c b/drivers/mmc/host/msm_sdcc.c
index 50c115a..6117098 100644
--- a/drivers/mmc/host/msm_sdcc.c
+++ b/drivers/mmc/host/msm_sdcc.c
@@ -4571,7 +4571,7 @@
mmc->caps |= (MMC_CAP_SET_XPC_330 | MMC_CAP_SET_XPC_300 |
MMC_CAP_SET_XPC_180);
- mmc->caps2 |= MMC_CAP2_BOOTPART_NOACC;
+ mmc->caps2 |= (MMC_CAP2_BOOTPART_NOACC | MMC_CAP2_DETECT_ON_ERR);
if (pdev->dev.of_node) {
if (of_get_property((&pdev->dev)->of_node,
"qcom,sdcc-hs200", NULL))