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

Commit 3ecc3920 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "UPSTREAM: mmc: block: fix read single on recovery logic"

parents 7ffc4558 011636ca
Loading
Loading
Loading
Loading
+14 −14
Original line number Diff line number Diff line
@@ -1718,12 +1718,13 @@ static void mmc_blk_read_single(struct mmc_queue *mq, struct request *req)
	struct mmc_card *card = mq->card;
	struct mmc_host *host = card->host;
	blk_status_t error = BLK_STS_OK;
	int retries = 0;

	do {
		u32 status;
		int err;
		int retries = 0;

		while (retries++ <= MMC_READ_SINGLE_RETRIES) {
			mmc_blk_rw_rq_prep(mqrq, card, 1, mq);

			mmc_wait_for_req(host, mrq);
@@ -1739,10 +1740,9 @@ static void mmc_blk_read_single(struct mmc_queue *mq, struct request *req)
					goto error_exit;
			}

		if (mrq->cmd->error && retries++ < MMC_READ_SINGLE_RETRIES)
			continue;

		retries = 0;
			if (!mrq->cmd->error)
				break;
		}

		if (mrq->cmd->error ||
		    mrq->data->error ||