mmc: block: Do not call post_req in DCMD case
No need to call post_req if it's a DCMD request
completion.
Change-Id: Id11165967e316b1e556aaeb6d67bd18844cee6e1
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index 2b4d193..db0b8b5 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -3361,11 +3361,11 @@
if (!ret) {
WARN_ON(!test_and_clear_bit(itag,
&ctx_info->data_active_reqs));
+ mmc_cmdq_post_req(host, itag, err);
} else {
clear_bit(CMDQ_STATE_DCMD_ACTIVE,
&ctx_info->curr_state);
}
- mmc_cmdq_post_req(host, itag, err);
WARN_ON(!test_and_clear_bit(itag,
&ctx_info->active_reqs));
mmc_host_clk_release(host);
@@ -3577,8 +3577,8 @@
else
BUG_ON(!test_and_clear_bit(cmdq_req->tag,
&ctx_info->data_active_reqs));
-
- mmc_cmdq_post_req(host, cmdq_req->tag, err);
+ if (!is_dcmd)
+ mmc_cmdq_post_req(host, cmdq_req->tag, err);
if (cmdq_req->cmdq_req_flags & DCMD) {
clear_bit(CMDQ_STATE_DCMD_ACTIVE, &ctx_info->curr_state);
blk_end_request_all(rq, err);