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

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

mmc: core: Fix issues observed with DRV_IN/OUT requests handling



With newly added DRV IN/OUT type of request handling in command queue
<607fdf34> ("MMC: Core: Fix reading ext_csd and status from debugfs")
device hang upon reboot issues are reported.
Host lock was not getting released after handling the DRV IN/OUT
requests. This is blocking other processes to complete their disk
requests, which is eventually leading to hang.

Now host lock is released after processing DRV IN/OUT type of requests.

Change-Id: I94b7925cc1207f3adb46428edf6088bab6356835
Signed-off-by: default avatarRam Prakash Gupta <rampraka@codeaurora.org>
parent 832d34e5
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -3510,6 +3510,7 @@ static int mmc_blk_cmdq_issue_drv_op(struct mmc_card *card, struct request *req)
		pr_err("%s: failed to halt on empty queue\n",
						mmc_hostname(card->host));
		blk_end_request_all(req, ret);
		mmc_put_card(card);
		return ret;
	}

@@ -3546,6 +3547,7 @@ static int mmc_blk_cmdq_issue_drv_op(struct mmc_card *card, struct request *req)
	if (ret)
		pr_err("%s: %s: failed to unhalt\n",
				mmc_hostname(card->host), __func__);
	mmc_put_card(card);

	return ret;
}
@@ -3611,8 +3613,6 @@ static int mmc_blk_cmdq_issue_rq(struct mmc_queue *mq, struct request *req)
		case REQ_OP_DRV_IN:
		case REQ_OP_DRV_OUT:
			ret = mmc_blk_cmdq_issue_drv_op(card, req);
			if (ret)
				goto out_card;
			break;
		default:
			ret = mmc_blk_cmdq_issue_rw_rq(mq, req);
@@ -3646,7 +3646,6 @@ static int mmc_blk_cmdq_issue_rq(struct mmc_queue *mq, struct request *req)
out:
	if (req)
		blk_end_request_all(req, ret);
out_card:
	mmc_put_card(card);

	return ret;