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

Commit b18e318a authored by Sayali Lokhande's avatar Sayali Lokhande Committed by Gerrit - the friendly Code Review server
Browse files

Revert "mmc: mmc: Attempt to flush cache before reset"



This reverts commit 437db4c6.

In current design, mmc_cmdq_thread() context will claim host and
mmc_blk_cmdq_complete or mmc_blk_cmdq_err contexts will release
the host. The upstream change added mmc_flush_cache() to mmc_reset()
which is used in mmc_blk_cmdq_err and resulting in deadlock.

schedule()
__mmc_claim_host() >> claimed by mmc-cmdqd
mmc_interrupt_hpi()
mmc_flush_cache()
mmc_reset()
mmc_cmdq_hw_reset()
mmc_blk_cmdq_reset.constprop.43()
mmc_blk_cmdq_reset_all(inline)
mmc_blk_cmdq_err()
mmc_cmdq_error_work()

So we cannot claim host within completion or error contexts.

Change-Id: I98b528104795ce217fc8ed52d822b34d20cdb00c
Signed-off-by: default avatarSayali Lokhande <sayalil@codeaurora.org>
parent f6f026ce
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -2952,12 +2952,6 @@ static int mmc_reset(struct mmc_host *host)
	struct mmc_card *card = host->card;
	int ret;

	/*
	 * In the case of recovery, we can't expect flushing the cache to work
	 * always, but we have a go and ignore errors.
	 */
	mmc_flush_cache(host->card);

	if ((host->caps & MMC_CAP_HW_RESET) && host->ops->hw_reset &&
	     mmc_can_reset(card)) {
		mmc_host_clk_hold(host);