mmc: core: Abort failed transfer before retries
Pavan Kunapuli [Fri, 4 May 2012 12:53:56 +0000 (17:53 +0530)]
Retries should be done only after abort command
is issued for the current failed transfer. The block
layer already has an implementation for retrying.
No need for the extra retries.

Bug 961761
Bug 922239

Change-Id: I07f60e85e093b725007727833739013f8fd66d43
Signed-off-by: Pavan Kunapuli <pkunapuli@nvidia.com>
Reviewed-on: http://git-master/r/100563
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>

drivers/mmc/card/block.c
drivers/mmc/core/core.c

index 2bd93d7..bd5427d 100644 (file)
@@ -59,8 +59,6 @@ MODULE_ALIAS("mmc:block");
 #define INAND_CMD38_ARG_SECTRIM1 0x81
 #define INAND_CMD38_ARG_SECTRIM2 0x88
 
-#define MMC_CMD_RETRIES        10
-
 static DEFINE_MUTEX(block_mutex);
 
 /*
@@ -945,7 +943,6 @@ static void mmc_blk_rw_rq_prep(struct mmc_queue_req *mqrq,
        if (!mmc_card_blockaddr(card))
                brq->cmd.arg <<= 9;
        brq->cmd.flags = MMC_RSP_SPI_R1 | MMC_RSP_R1 | MMC_CMD_ADTC;
-       brq->cmd.retries = MMC_CMD_RETRIES;
        brq->data.blksz = 512;
        brq->stop.opcode = MMC_STOP_TRANSMISSION;
        brq->stop.arg = 0;
index 2a288e9..c5338cd 100644 (file)
@@ -109,11 +109,6 @@ void mmc_request_done(struct mmc_host *host, struct mmc_request *mrq)
 
                cmd->retries--;
                cmd->error = 0;
-               if (mrq->data) {
-                       mrq->data->error = 0;
-                       if (mrq->stop)
-                               mrq->stop->error = 0;
-               }
                host->ops->request(host, mrq);
        } else {
                led_trigger_event(host->led, LED_OFF);