diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2017-02-23 21:35:47 -0800 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-02-23 21:35:47 -0800 |
| commit | f701481cfbe7e4cefd5128ff9fa268e626e7ee69 (patch) | |
| tree | c9b88f6526cea2f48aafff887babbf62fe6b18ff | |
| parent | 69bf85c82b8e2b1b61b912574a09d88ddb86d642 (diff) | |
| parent | b17b8358e0748657e3454ddfbeafc6896591530e (diff) | |
Merge "MMC : card: check for card status incase of timeout error"
| -rw-r--r-- | drivers/mmc/card/block.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c index 52e3e9b5b778..60b02f28a8ff 100644 --- a/drivers/mmc/card/block.c +++ b/drivers/mmc/card/block.c @@ -3482,15 +3482,23 @@ static void mmc_blk_cmdq_err(struct mmc_queue *mq) /* RED error - Fatal: requires reset */ if (mrq->cmdq_req->resp_err) { err = mrq->cmdq_req->resp_err; + goto reset; + } + + /* + * TIMEOUT errrors can happen because of execution error + * in the last command. So send cmd 13 to get device status + */ + if ((mrq->cmd && (mrq->cmd->error == -ETIMEDOUT)) || + (mrq->data && (mrq->data->error == -ETIMEDOUT))) { if (mmc_host_halt(host) || mmc_host_cq_disable(host)) { ret = get_card_status(host->card, &status, 0); if (ret) pr_err("%s: CMD13 failed with err %d\n", mmc_hostname(host), ret); } - pr_err("%s: Response error detected with device status 0x%08x\n", + pr_err("%s: Timeout error detected with device status 0x%08x\n", mmc_hostname(host), status); - goto reset; } /* |
