summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Medhurst <jon.medhurst@linaro.org>2011-12-20 15:03:38 +0000
committerJon Medhurst <tixy@linaro.org>2012-07-25 12:59:18 +0100
commit830398242a067625a36b84ca08fdec088e99d8da (patch)
tree847c3bbcab8f2acdf6e151fc41e2143daa983382
parent28a33cbc24e4256c143dce96c7d93bf423229f92 (diff)
mmc: block: Make multi-block write errors retry as single block writestracking-tracking-armlt-mmc-ll-20120727.0
The current mmc block code retries i/o errors on multi-block reads by using single block reads. For platforms with unreliable multi-block operations, like the ARM Versatile Express board, this is a valuable error recovery path. This patch extends the single block retry to also include write operations. Signed-off-by: Jon Medhurst <jon.medhurst@linaro.org>
-rw-r--r--drivers/mmc/card/block.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index 276d21ce6bc1..e6bb68059b83 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -1068,6 +1068,10 @@ static int mmc_blk_err_check(struct mmc_card *card,
return MMC_BLK_ECC_ERR;
return MMC_BLK_DATA_ERR;
} else {
+ if (brq->data.blocks > 1) {
+ /* Hack to redo transfer one sector at a time */
+ return MMC_BLK_DATA_ERR;
+ }
return MMC_BLK_CMD_ERR;
}
}
@@ -1354,7 +1358,7 @@ static int mmc_blk_issue_rw_rq(struct mmc_queue *mq, struct request *rqc)
case MMC_BLK_ECC_ERR:
if (brq->data.blocks > 1) {
/* Redo read one sector at a time */
- pr_warning("%s: retrying using single block read\n",
+ pr_warning("%s: retrying using single block transfer\n",
req->rq_disk->disk_name);
disable_multi = 1;
break;