Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d667bff1 authored by Subhash Jadavani's avatar Subhash Jadavani Committed by Xiaonian Wang
Browse files

mmc: core: kick cmdq thread after suspend



eMMC runtime suspend first puts the CMDQ to halt and then sets the card
state to suspended after sending out sleep command. If new requests get
queued after halting the CMDQ but before the card state has changed to
suspended then command queue thread will not be woken up again until
some new requests are queued to request queue. And if new request gets
queued, we will remain in this state forever. Fix this issue by kicking
the CMDQ thread after the suspend completion.

Change-Id: I37a03d9a75acf2ab3ebda57da87e246b449abf18
Signed-off-by: default avatarSubhash Jadavani <subhashj@codeaurora.org>
parent 976e8cb3
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -2632,6 +2632,11 @@ static int _mmc_suspend(struct mmc_host *host, bool is_suspend)
		host->dev_status = DEV_UNKNOWN;
	else if (is_suspend)
		host->dev_status = DEV_SUSPENDED;

	/* Kick CMDQ thread to process any requests came in while suspending */
	if (host->card->cmdq_init)
		wake_up(&host->cmdq_ctx.wait);

	mmc_release_host(host);
	return err;
}