summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@quicinc.com>2017-05-01 23:56:56 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2017-05-01 23:56:55 -0700
commitcf05282438e83492012ad7bd58624c6b39c139bc (patch)
treec64ba309e41af43d41a8e604dc57fe5c6b55f9f7
parent71e7e17ea16e436968132b2d2c94374590831236 (diff)
parent00229f96af9e3a01d6b7d5bd1e6dd41a559a77eb (diff)
Merge "mmc: cmdq_hci: Avoid releasing clock twice during DCMD error"
-rw-r--r--drivers/mmc/card/queue.c7
-rw-r--r--drivers/mmc/host/cmdq_hci.c15
2 files changed, 12 insertions, 10 deletions
diff --git a/drivers/mmc/card/queue.c b/drivers/mmc/card/queue.c
index f5dbb67ba929..ccf22eb5bdc0 100644
--- a/drivers/mmc/card/queue.c
+++ b/drivers/mmc/card/queue.c
@@ -128,14 +128,11 @@ static int mmc_cmdq_thread(void *d)
ret = mq->cmdq_issue_fn(mq, mq->cmdq_req_peeked);
/*
- * Don't requeue if issue_fn fails, just bug on.
- * We don't expect failure here and there is no recovery other
- * than fixing the actual issue if there is any.
+ * Don't requeue if issue_fn fails.
+ * Recovery will be come by completion softirq
* Also we end the request if there is a partition switch error,
* so we should not requeue the request here.
*/
- if (ret)
- BUG_ON(1);
} /* loop */
return 0;
diff --git a/drivers/mmc/host/cmdq_hci.c b/drivers/mmc/host/cmdq_hci.c
index a83960fd474f..3f741f83a436 100644
--- a/drivers/mmc/host/cmdq_hci.c
+++ b/drivers/mmc/host/cmdq_hci.c
@@ -1102,12 +1102,17 @@ skip_cqterri:
* before setting doorbell, hence one is not needed here.
*/
for_each_set_bit(tag, &comp_status, cq_host->num_slots) {
- /* complete the corresponding mrq */
- pr_debug("%s: completing tag -> %lu\n",
- mmc_hostname(mmc), tag);
- MMC_TRACE(mmc, "%s: completing tag -> %lu\n",
- __func__, tag);
+ mrq = get_req_by_tag(cq_host, tag);
+ if (!((mrq->cmd && mrq->cmd->error) ||
+ mrq->cmdq_req->resp_err ||
+ (mrq->data && mrq->data->error))) {
+ /* complete the corresponding mrq */
+ pr_debug("%s: completing tag -> %lu\n",
+ mmc_hostname(mmc), tag);
+ MMC_TRACE(mmc, "%s: completing tag -> %lu\n",
+ __func__, tag);
cmdq_finish_data(mmc, tag);
+ }
}
}