diff options
author | Adrian Hunter <adrian.hunter@intel.com> | 2015-05-07 13:10:22 +0300 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2015-06-01 09:06:58 +0200 |
commit | bd11e8bd03cae9e0499c34f67c55408566f6a089 (patch) | |
tree | f50072b079cd1e95974a69deb1673430623b472e /drivers | |
parent | 66c39dfc92f9d35ed9f713833156547842086891 (diff) |
mmc: core: Flag re-tuning is needed on CRC errors
CRC errors could possibly be alleviated by
re-tuning so flag re-tuning needed in those cases.
Note this has no effect if re-tuning has not been
enabled.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mmc/core/core.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index adb64087a28a..c93062bc4f2d 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -133,6 +133,12 @@ void mmc_request_done(struct mmc_host *host, struct mmc_request *mrq) struct mmc_command *cmd = mrq->cmd; int err = cmd->error; + /* Flag re-tuning needed on CRC errors */ + if (err == -EILSEQ || (mrq->sbc && mrq->sbc->error == -EILSEQ) || + (mrq->data && mrq->data->error == -EILSEQ) || + (mrq->stop && mrq->stop->error == -EILSEQ)) + mmc_retune_needed(host); + if (err && cmd->retries && mmc_host_is_spi(host)) { if (cmd->resp[0] & R1_SPI_ILLEGAL_COMMAND) cmd->retries = 0; |