From c95f566ab07c8550a1c25f1ff1f8209326a00ff3 Mon Sep 17 00:00:00 2001 From: lintao Date: Mon, 26 Jan 2015 09:57:11 +0800 Subject: [PATCH] mmc: add more waiting for erase and status op --- drivers/mmc/core/core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 999c4df76622..3e809c2435c8 100755 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -437,7 +437,10 @@ static void mmc_wait_for_req_done(struct mmc_host *host, u32 timeout = 0; if (!mrq->cmd->data) { - timeout = 500; + if (mrq->cmd->opcode == MMC_ERASE || (mrq->cmd->opcode == MMC_SEND_STATUS)) + timeout = 2500000; + else + timeout = 500; } else { timeout = mrq->cmd->data->blocks * mrq->cmd->data->blksz * 500; if(!timeout) -- 2.34.1