Patch "mmc: core: fix dead loop of mmc_retune" has been added to the 4.2-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
mmc: core: fix dead loop of mmc_retune
to the 4.2-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
mmc-core-fix-dead-loop-of-mmc_retune.patch
and it can be found in the queue-4.2 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
031277d4d33d33f0174fbb569ca8f68238175617Mon Sep 17 00:00:00 2001
From: Chaotian Jing <[email protected]>
Date: Wed, 30 Sep 2015 17:37:18 +0800
Subject: mmc: core: fix dead loop of mmc_retune
From: Chaotian Jing <[email protected]>
commit 031277d4d33d33f0174fbb569ca8f68238175617 upstream.
When get a CRC error, start the mmc_retune, it will issue CMD19/CMD21 to do tune, assume there were 10 clock phase need to try, phase 0 to phase 6 is ok, phase 7 to phase 9 is NG, we try it from 0 to 9, so the last CMD19/CMD21 will get CRC error, host->need_retune was set and cause mmc_retune was called, then dead loop of mmc_retune
--- drivers/mmc/core/core.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/mmc/core/core.c +4 -2
@@ -134,9 +134,11 @@ void mmc_request_done(struct mmc_host *hint err = cmd->error;/* Flag re-tuning needed on CRC errors */ -if (err == -EILSEQ || (mrq->sbc && mrq->sbc->error == -EILSEQ ) || +if ((cmd->opcode !=MMC_SEND_TUNING_BLOCK && + cmd->opcode !=MMC_SEND_TUNING_BLOCK_HS200 ) && + (err == -EILSEQ || (mrq->sbc && mrq->sbc->error == -EILSEQ ) || (mrq->data && mrq->data->error == -EILSEQ ) || - (mrq->stop && mrq->stop->error == -EILSEQ )) + (mrq->stop && mrq->stop->error == -EILSEQ )))mmc_retune_needed (host);if (err && cmd->retries &&mmc_host_is_spi (host)) {
Patches currently in stable-queue which might be from [email protected] are
queue-4.2/mmc-core-fix-dead-loop-of-mmc_retune.patch