diff options
author | Jeremy.Yao <r65161@freescale.com> | 2010-05-18 15:46:29 +0800 |
---|---|---|
committer | Jeremy.Yao <r65161@freescale.com> | 2010-05-19 10:38:46 +0800 |
commit | b59d453bd7307db80673613b14f9d2f5fdb1cdd5 (patch) | |
tree | fb1bdebb77011077e1d817cccc05ec714a234b6c | |
parent | c418a553cb4367a991c00c7b1e5ea43bb2ac94c9 (diff) |
ENGR00123389: iMX23 system fail to detect sd remove
Fix the problem the card is still connected while status shows it's removed
Signed-off-by: Jeremy Yao <r65161@freescale.com>
-rw-r--r-- | drivers/mmc/host/mxs-mmc.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c index 7e53e714ec6a..48cdc76b1465 100644 --- a/drivers/mmc/host/mxs-mmc.c +++ b/drivers/mmc/host/mxs-mmc.c @@ -698,6 +698,13 @@ static void mxs_mmc_request(struct mmc_host *mmc, struct mmc_request *mrq) struct mxs_mmc_host *host = mmc_priv(mmc); dev_dbg(host->dev, "MMC request\n"); + + if (!host->present) { + mrq->cmd->error = -ETIMEDOUT; + mmc_request_done(mmc, mrq); + return; + } + BUG_ON(host->mrq != NULL); host->mrq = mrq; |