aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/core/core.c
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@linaro.org>2013-12-18 03:57:38 -0500
committerChris Ball <chris@printf.net>2014-02-23 10:40:08 -0500
commit68eb80e06bfa06035d0304686124974780308fae (patch)
tree84a0dd60429c06284945edb365f568591464f3ab /drivers/mmc/core/core.c
parente18eaf8ff940d75d240d7dee6ab84363438f379e (diff)
mmc: core: Rename max_discard_to to max_busy_timeout
Rename host->max_discard_to to host->max_busy_timeout, to reflect that it tells the mmc core layer about the maximum supported busy detection timeout by the host. This timeout is at the moment only applicable to erase/trim/discard commands. By the renaming we provide the option of make use of it for other commands that cares about busy detection. In other words, those commands that wants an R1B response, like for example the mmc switch command. Do note that the max_busy_timeout is supposed to be specified only by hosts supporting MMC_CAP_WAIT_WHILE_BUSY. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Chris Ball <chris@printf.net>
Diffstat (limited to 'drivers/mmc/core/core.c')
-rw-r--r--drivers/mmc/core/core.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index f5a068d55c36..d9c1efa2ce15 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -2120,7 +2120,7 @@ static unsigned int mmc_do_calc_max_discard(struct mmc_card *card,
2120 y = 0; 2120 y = 0;
2121 for (x = 1; x && x <= max_qty && max_qty - x >= qty; x <<= 1) { 2121 for (x = 1; x && x <= max_qty && max_qty - x >= qty; x <<= 1) {
2122 timeout = mmc_erase_timeout(card, arg, qty + x); 2122 timeout = mmc_erase_timeout(card, arg, qty + x);
2123 if (timeout > host->max_discard_to) 2123 if (timeout > host->max_busy_timeout)
2124 break; 2124 break;
2125 if (timeout < last_timeout) 2125 if (timeout < last_timeout)
2126 break; 2126 break;
@@ -2152,7 +2152,7 @@ unsigned int mmc_calc_max_discard(struct mmc_card *card)
2152 struct mmc_host *host = card->host; 2152 struct mmc_host *host = card->host;
2153 unsigned int max_discard, max_trim; 2153 unsigned int max_discard, max_trim;
2154 2154
2155 if (!host->max_discard_to) 2155 if (!host->max_busy_timeout)
2156 return UINT_MAX; 2156 return UINT_MAX;
2157 2157
2158 /* 2158 /*
@@ -2172,7 +2172,7 @@ unsigned int mmc_calc_max_discard(struct mmc_card *card)
2172 max_discard = 0; 2172 max_discard = 0;
2173 } 2173 }
2174 pr_debug("%s: calculated max. discard sectors %u for timeout %u ms\n", 2174 pr_debug("%s: calculated max. discard sectors %u for timeout %u ms\n",
2175 mmc_hostname(host), max_discard, host->max_discard_to); 2175 mmc_hostname(host), max_discard, host->max_busy_timeout);
2176 return max_discard; 2176 return max_discard;
2177} 2177}
2178EXPORT_SYMBOL(mmc_calc_max_discard); 2178EXPORT_SYMBOL(mmc_calc_max_discard);