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

Commit 2b49ef33 authored by Subhash Jadavani's avatar Subhash Jadavani
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 3b74bf1e
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -2374,6 +2374,11 @@ out:
		host->dev_status = DEV_UNKNOWN;
		host->dev_status = DEV_UNKNOWN;
	else if (is_suspend)
	else if (is_suspend)
		host->dev_status = DEV_SUSPENDED;
		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);
	mmc_release_host(host);
	return err;
	return err;
}
}