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

Commit 5451b436 authored by Konstantin Dorfman's avatar Konstantin Dorfman
Browse files

mmc: queue: do not clean current request when urgent in progress



As a result of following fix: "mmc: core: do not reinsert prepeared
FUA and FLUSH requests in stop flow" REQ_FUA and REQ_FLUSH requests
are not reinserted back into i/o scheduler, but instead started request
execution.

This change will prevent cleaning current request pointer for such
requests.

Change-Id: I25f8706954fb538be62182c87d5fb20354696b7a
CRs-fixed: 600127
Signed-off-by: default avatarKonstantin Dorfman <kdorfman@codeaurora.org>
parent 4f474843
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -2732,7 +2732,8 @@ out:
	 */
	if ((!req && !(mq->flags & MMC_QUEUE_NEW_REQUEST)) ||
			((mq->flags & MMC_QUEUE_URGENT_REQUEST) &&
			 !(mq->mqrq_cur->req->cmd_flags & REQ_URGENT))) {
			 !(mq->mqrq_cur->req->cmd_flags &
				MMC_REQ_NOREINSERT_MASK))) {
		if (mmc_card_need_bkops(card))
			mmc_start_bkops(card, false);
		/*
+2 −1
Original line number Diff line number Diff line
@@ -80,7 +80,8 @@ static int mmc_queue_thread(void *d)
				continue; /* fetch again */
			} else if ((mq->flags & MMC_QUEUE_URGENT_REQUEST) &&
				   (mq->mqrq_cur->req &&
				!(mq->mqrq_cur->req->cmd_flags & REQ_URGENT))) {
				!(mq->mqrq_cur->req->cmd_flags &
				       MMC_REQ_NOREINSERT_MASK))) {
				/*
				 * clean current request when urgent request
				 * processing in progress and current request is
+2 −3
Original line number Diff line number Diff line
@@ -897,9 +897,8 @@ struct mmc_async_req *mmc_start_req(struct mmc_host *host,
			mmc_post_req(host, host->areq->mrq, 0);
			host->areq = NULL;
			if (areq) {
				if (!(areq->cmd_flags & (REQ_URGENT
							 | REQ_FUA
							 | REQ_FLUSH))) {
				if (!(areq->cmd_flags &
						MMC_REQ_NOREINSERT_MASK)) {
					areq->reinsert_req(areq);
					mmc_post_req(host, areq->mrq, 0);
				} else {
+2 −0
Original line number Diff line number Diff line
@@ -215,6 +215,8 @@ enum rq_flag_bits {
#define REQ_NOMERGE_FLAGS \
	(REQ_NOMERGE | REQ_STARTED | REQ_SOFTBARRIER | REQ_FLUSH | REQ_FUA)

#define MMC_REQ_NOREINSERT_MASK (REQ_URGENT | REQ_FUA | REQ_FLUSH)

#define REQ_RAHEAD		(1 << __REQ_RAHEAD)
#define REQ_THROTTLED		(1 << __REQ_THROTTLED)