Commit f71077a4 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'mmc-v5.17-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc

Pull MMC fix from Ulf Hansson:
 "Fix recovery logic for multi block I/O reads (MMC_READ_MULTIPLE_BLOCK)"

* tag 'mmc-v5.17-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
  mmc: block: fix read single on recovery logic
parents 35930307 54309fde
...@@ -1682,12 +1682,13 @@ static void mmc_blk_read_single(struct mmc_queue *mq, struct request *req) ...@@ -1682,12 +1682,13 @@ static void mmc_blk_read_single(struct mmc_queue *mq, struct request *req)
struct mmc_card *card = mq->card; struct mmc_card *card = mq->card;
struct mmc_host *host = card->host; struct mmc_host *host = card->host;
blk_status_t error = BLK_STS_OK; blk_status_t error = BLK_STS_OK;
int retries = 0;
do { do {
u32 status; u32 status;
int err; int err;
int retries = 0;
while (retries++ <= MMC_READ_SINGLE_RETRIES) {
mmc_blk_rw_rq_prep(mqrq, card, 1, mq); mmc_blk_rw_rq_prep(mqrq, card, 1, mq);
mmc_wait_for_req(host, mrq); mmc_wait_for_req(host, mrq);
...@@ -1703,10 +1704,9 @@ static void mmc_blk_read_single(struct mmc_queue *mq, struct request *req) ...@@ -1703,10 +1704,9 @@ static void mmc_blk_read_single(struct mmc_queue *mq, struct request *req)
goto error_exit; goto error_exit;
} }
if (mrq->cmd->error && retries++ < MMC_READ_SINGLE_RETRIES) if (!mrq->cmd->error)
continue; break;
}
retries = 0;
if (mrq->cmd->error || if (mrq->cmd->error ||
mrq->data->error || mrq->data->error ||
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment