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

Commit a203bd76 authored by Ram Prakash Gupta's avatar Ram Prakash Gupta
Browse files

Revert "mmc: core: rescan for card if deferred resume fails"



This reverts commit 9de18caa.
Reverting this change as this is introducing race condition with
sdcard plug out scenario and leading to device crash.
	1. Deferred resume kicks in
	2. SDCard is plugged out
	3. Deferred resume failed
	4. SDCard detection scheduled as resume fails
	5. Device crashing

Change-Id: I6fd81d6c21be4a0e3139246c9d66959010fd240c
Signed-off-by: default avatarRam Prakash Gupta <rampraka@codeaurora.org>
parent 13a99086
Loading
Loading
Loading
Loading
+1 −16
Original line number Diff line number Diff line
@@ -3251,22 +3251,7 @@ int mmc_resume_bus(struct mmc_host *host)
	if (host->bus_ops && !host->bus_dead && host->card && card_present) {
		mmc_power_up(host, host->card->ocr);
		BUG_ON(!host->bus_ops->resume);
		err = host->bus_ops->resume(host);
		if (err) {
			pr_err("%s: %s: resume failed: %d\n",
				       mmc_hostname(host), __func__, err);
			/*
			 * If we have cd-gpio based detection mechanism and
			 * deferred resume is supported, we will not detect
			 * card removal event when system is suspended. So if
			 * resume fails after a system suspend/resume,
			 * schedule the work to detect card presence.
			 */
			if (mmc_card_is_removable(host) &&
					!(host->caps & MMC_CAP_NEEDS_POLL)) {
				mmc_detect_change(host, 0);
			}
		}
		host->bus_ops->resume(host);
		if (mmc_card_cmdq(host->card)) {
			err = mmc_cmdq_halt(host, false);
			if (err)
+0 −2
Original line number Diff line number Diff line
@@ -1322,8 +1322,6 @@ static int _mmc_sd_resume(struct mmc_host *host)
			mmc_hostname(host), __func__, err);
		mmc_card_set_removed(host->card);
		mmc_detect_change(host, msecs_to_jiffies(200));
	} else if (err) {
		goto out;
	}
	mmc_card_clr_suspended(host->card);