summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVenkat Gopalakrishnan <venkatg@codeaurora.org>2015-10-01 14:34:10 -0700
committerSubhash Jadavani <subhashj@codeaurora.org>2016-05-31 15:27:39 -0700
commit28791b7d462d292aff9fea06376656c43e84d0eb (patch)
tree14198dbfaa16eab4b5ecda03cc9d9aaf47c7bafa
parent4c7ffe38b389ba2df9b36a4f3cfd70447f042c0b (diff)
mmc: cmdq_hci: verify the doorbell bit for DCMD before setting
We make sure that the doorbell bit for any regular slot is not set before ringing the doorbell for that slot, make sure of the same for DCMD slot too. Change-Id: Ia96e8d6ae0c28aad21f4a3cf46b27c7a5c878971 Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
-rw-r--r--drivers/mmc/host/cmdq_hci.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/mmc/host/cmdq_hci.c b/drivers/mmc/host/cmdq_hci.c
index 4c6efe93ae91..af67be35ef4b 100644
--- a/drivers/mmc/host/cmdq_hci.c
+++ b/drivers/mmc/host/cmdq_hci.c
@@ -631,8 +631,6 @@ static int cmdq_request(struct mmc_host *mmc, struct mmc_request *mrq)
goto out;
}
- BUG_ON(cmdq_readl(cq_host, CQTDBR) & (1 << tag));
-
cq_host->mrq_slot[tag] = mrq;
if (cq_host->ops->set_tranfer_params)
cq_host->ops->set_tranfer_params(mmc);
@@ -643,6 +641,10 @@ static int cmdq_request(struct mmc_host *mmc, struct mmc_request *mrq)
ring_doorbell:
/* Ensure the task descriptor list is flushed before ringing doorbell */
wmb();
+ if (cmdq_readl(cq_host, CQTDBR) & (1 << tag)) {
+ cmdq_dumpregs(cq_host);
+ BUG_ON(1);
+ }
cmdq_writel(cq_host, 1 << tag, CQTDBR);
/* Commit the doorbell write immediately */
wmb();