|
@@ -2120,7 +2120,7 @@ static unsigned int mmc_do_calc_max_discard(struct mmc_card *card,
|
|
y = 0;
|
|
y = 0;
|
|
for (x = 1; x && x <= max_qty && max_qty - x >= qty; x <<= 1) {
|
|
for (x = 1; x && x <= max_qty && max_qty - x >= qty; x <<= 1) {
|
|
timeout = mmc_erase_timeout(card, arg, qty + x);
|
|
timeout = mmc_erase_timeout(card, arg, qty + x);
|
|
- if (timeout > host->max_discard_to)
|
|
|
|
|
|
+ if (timeout > host->max_busy_timeout)
|
|
break;
|
|
break;
|
|
if (timeout < last_timeout)
|
|
if (timeout < last_timeout)
|
|
break;
|
|
break;
|
|
@@ -2152,7 +2152,7 @@ unsigned int mmc_calc_max_discard(struct mmc_card *card)
|
|
struct mmc_host *host = card->host;
|
|
struct mmc_host *host = card->host;
|
|
unsigned int max_discard, max_trim;
|
|
unsigned int max_discard, max_trim;
|
|
|
|
|
|
- if (!host->max_discard_to)
|
|
|
|
|
|
+ if (!host->max_busy_timeout)
|
|
return UINT_MAX;
|
|
return UINT_MAX;
|
|
|
|
|
|
/*
|
|
/*
|
|
@@ -2172,7 +2172,7 @@ unsigned int mmc_calc_max_discard(struct mmc_card *card)
|
|
max_discard = 0;
|
|
max_discard = 0;
|
|
}
|
|
}
|
|
pr_debug("%s: calculated max. discard sectors %u for timeout %u ms\n",
|
|
pr_debug("%s: calculated max. discard sectors %u for timeout %u ms\n",
|
|
- mmc_hostname(host), max_discard, host->max_discard_to);
|
|
|
|
|
|
+ mmc_hostname(host), max_discard, host->max_busy_timeout);
|
|
return max_discard;
|
|
return max_discard;
|
|
}
|
|
}
|
|
EXPORT_SYMBOL(mmc_calc_max_discard);
|
|
EXPORT_SYMBOL(mmc_calc_max_discard);
|