Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mmc: sdhci: tegra: fix wrong unit with busy_timeout

'busy_timeout' is in msecs, not in jiffies. Use the correct factor.

Fixes: 5e958e4aacf4 ("sdhci: tegra: Implement Tegra specific set_timeout callback")
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: Sowjanya Komatineni <skomatineni@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20201116132206.23518-1-wsa+renesas@sang-engineering.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

authored by

Wolfram Sang and committed by
Ulf Hansson
fcc541fe fde71a3e

+1 -1
+1 -1
drivers/mmc/host/sdhci-tegra.c
··· 1272 1272 * busy wait mode. 1273 1273 */ 1274 1274 val = sdhci_readl(host, SDHCI_TEGRA_VENDOR_MISC_CTRL); 1275 - if (cmd && cmd->busy_timeout >= 11 * HZ) 1275 + if (cmd && cmd->busy_timeout >= 11 * MSEC_PER_SEC) 1276 1276 val |= SDHCI_MISC_CTRL_ERASE_TIMEOUT_LIMIT; 1277 1277 else 1278 1278 val &= ~SDHCI_MISC_CTRL_ERASE_TIMEOUT_LIMIT;