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

Commit 1622ed4b authored by Ram Prakash Gupta's avatar Ram Prakash Gupta
Browse files

mmc: core: Set SDCard as removed upon recovery failure



In case of BAD SDCard, android screen does not come up
as one request from screen daemon is pending with SDCard
driver. Since SDCard is bad, data transfer fails in each
attempt and during recovery same request is queued again.
So request from android screen daemon never completes,
which leads to android screen off.

To fix this issue, set SDCard device as removed if hardware
reset also fails during recovery.

With this change android screen goes off only during first
recovery attempt.

Change-Id: I453f14f6e4d7bb0196c03c86b8caa93e4fce57e9
Signed-off-by: default avatarRam Prakash Gupta <rampraka@codeaurora.org>
parent a21cd1f1
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1889,6 +1889,8 @@ static void mmc_blk_mq_rw_recovery(struct mmc_queue *mq, struct request *req)
	    err && mmc_blk_reset(md, card->host, type)) {
		pr_err("%s: recovery failed!\n", req->rq_disk->disk_name);
		mqrq->retries = MMC_NO_RETRIES;
		if (mmc_card_sd(card))
			mmc_card_set_removed(card);
		return;
	}