mmc: core: Rename cmd_timeout_ms to busy_timeout
authorUlf Hansson <ulf.hansson@linaro.org>
Wed, 8 Jan 2014 14:06:08 +0000 (15:06 +0100)
committerChris Ball <chris@printf.net>
Sun, 23 Feb 2014 15:40:26 +0000 (10:40 -0500)
To better reflect that the cmd_timeout_ms is directly related to the
busy detection timeout, let's rename it.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <chris@printf.net>
drivers/mmc/core/core.c
drivers/mmc/core/mmc_ops.c
drivers/mmc/host/sdhci.c
include/linux/mmc/core.h

index d9c1efa2ce1575175e923174b7758f02d1d33111..1935812e4215d8ccc5fcb6b361d55697a2a28553 100644 (file)
@@ -1933,7 +1933,7 @@ static int mmc_do_erase(struct mmc_card *card, unsigned int from,
        cmd.opcode = MMC_ERASE;
        cmd.arg = arg;
        cmd.flags = MMC_RSP_SPI_R1B | MMC_RSP_R1B | MMC_CMD_AC;
-       cmd.cmd_timeout_ms = mmc_erase_timeout(card, arg, qty);
+       cmd.busy_timeout = mmc_erase_timeout(card, arg, qty);
        err = mmc_wait_for_cmd(card->host, &cmd, 0);
        if (err) {
                pr_err("mmc_erase: erase error %d, status %#x\n",
index e5b5eeb548d17eb08e1f374a83024dc5e4a1170b..3377bbfc3585b256c029822318a8a59887d4bc91 100644 (file)
@@ -432,7 +432,7 @@ int __mmc_switch(struct mmc_card *card, u8 set, u8 index, u8 value,
                cmd.flags |= MMC_RSP_SPI_R1 | MMC_RSP_R1;
 
 
-       cmd.cmd_timeout_ms = timeout_ms;
+       cmd.busy_timeout = timeout_ms;
        if (index == EXT_CSD_SANITIZE_START)
                cmd.sanitize_busy = true;
 
index d1e1bf52fe526e3b6586ff778fff8a4ca1efc086..7f95211e9449daa90b432869114b5c85e270185e 100644 (file)
@@ -675,12 +675,12 @@ static u8 sdhci_calc_timeout(struct sdhci_host *host, struct mmc_command *cmd)
                return 0xE;
 
        /* Unspecified timeout, assume max */
-       if (!data && !cmd->cmd_timeout_ms)
+       if (!data && !cmd->busy_timeout)
                return 0xE;
 
        /* timeout in us */
        if (!data)
-               target_timeout = cmd->cmd_timeout_ms * 1000;
+               target_timeout = cmd->busy_timeout * 1000;
        else {
                target_timeout = data->timeout_ns / 1000;
                if (host->clock)
@@ -1019,8 +1019,8 @@ void sdhci_send_command(struct sdhci_host *host, struct mmc_command *cmd)
        }
 
        timeout = jiffies;
-       if (!cmd->data && cmd->cmd_timeout_ms > 9000)
-               timeout += DIV_ROUND_UP(cmd->cmd_timeout_ms, 1000) * HZ + HZ;
+       if (!cmd->data && cmd->busy_timeout > 9000)
+               timeout += DIV_ROUND_UP(cmd->busy_timeout, 1000) * HZ + HZ;
        else
                timeout += 10 * HZ;
        mod_timer(&host->timer, timeout);
index 87079fc38011ccaca33f4ef6ad7d5d055ed3087e..b2769961288891096c7ab20e6d886d2177eab10b 100644 (file)
@@ -95,7 +95,7 @@ struct mmc_command {
  *              actively failing requests
  */
 
-       unsigned int            cmd_timeout_ms; /* in milliseconds */
+       unsigned int            busy_timeout;   /* busy detect timeout in ms */
        /* Set this flag only for blocking sanitize request */
        bool                    sanitize_busy;