mmc: card: kick command queue thread on completion of RPMB operation
During RPMB operation, command queue mode would be disabled and we don't
exlicitly move back to command queue once the RPMB operation is completed.
We expect the command queue thread to switch operating mode (or partition)
to command queue before issuing the new transfers in command queue but
command queue thread isn't getting scheduled if we don't wake it up
explicitly or if some other new transfer get submitted to the queue.
Fix this issue by explicitly waking up the command queue thread after the
completion of RPMB operation.
Change-Id: I68b2f7989d68b51b4810346458e1966d45aee5a2
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
[xiaonian@codeaurora.org: fixed trivial merge conflicts and
fixed one compilation error]
Signed-off-by: Xiaonian Wang <xiaonian@codeaurora.org>
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index 2e75e18..2893f6e 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -1008,7 +1008,7 @@
{
struct mmc_blk_ioc_rpmb_data *idata;
struct mmc_blk_data *md;
- struct mmc_card *card;
+ struct mmc_card *card = NULL;
struct mmc_command cmd = {0};
struct mmc_data data = {0};
struct mmc_request mrq = {NULL};
@@ -1164,6 +1164,8 @@
cmd_done:
mmc_blk_put(md);
+ if (card && card->cmdq_init)
+ wake_up(&card->host->cmdq_ctx.wait);
return err;
}