summaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorSeungwon Jeon <tgih.jun@samsung.com>2013-01-22 19:48:03 +0900
committerChris Ball <cjb@laptop.org>2013-02-24 14:37:12 -0500
commit9b844961c265a8ee4bdacd8404d078d7f1319957 (patch)
tree5139cdb5e0b816e12bfa3c0c649d8bf09ed21e36 /drivers/mmc
parent52983382c74f59a3953e622d7661a24e1bc4388a (diff)
mmc: core: fix permanent sleep of mmcqd during card removal
This patch is derived from: "mmc: fix async request mechanism for sequential read scenarios". According as async transfer, a request is handled with twice mmc_start_req. When the card is removed, the request is actually not issued in the first mmc_start_req [__mmc_start_data_req]. And then mmc_wait_for_data_req_done will come in the next mmc_start_req. But there is no event for completions. wake_up_interruptible is needed in __mmc_start_data_req for the case of removed card. Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com> Acked-by: Jaehoon Chung <jh80.chung@samsung.com> Tested-by: Konstantin Dorfman <kdorfman@codeaurora.org> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/core/core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index e41badbf9b5..6e95f6f11a2 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -350,6 +350,7 @@ static int __mmc_start_data_req(struct mmc_host *host, struct mmc_request *mrq)
mrq->host = host;
if (mmc_card_removed(host->card)) {
mrq->cmd->error = -ENOMEDIUM;
+ mmc_wait_data_done(mrq);
return -ENOMEDIUM;
}
mmc_start_request(host, mrq);