Re: [RFC PATCH] mmc: sdhci: tegra: fix wrong unit with busy_timeout

Thierry Reding
2020-11-13T16:38:56Z

[-- Attachment #1: Type: text/plain, Size: 1126 bytes --]

On Fri, Nov 13, 2020 at 01:53:30PM +0100, Wolfram Sang wrote:
> 'busy_timeout' is in msecs, not in jiffies. Use the correct factor.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
>
> Not tested. Found by code investigation about 'busy_timeout'. A quick
> grep showed no other problematic code within the MMC host drivers.
>
> drivers/mmc/host/sdhci-tegra.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

Sowjanya, can you take a look at this?

Thierry

> diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c
> index ed12aacb1c73..ad0dc3adc7d1 100644
> --- a/drivers/mmc/host/sdhci-tegra.c
> +++ b/drivers/mmc/host/sdhci-tegra.c
> @@ -1272,7 +1272,7 @@ static void tegra_sdhci_set_timeout(struct sdhci_host *host,
> * busy wait mode.
> */
> val = sdhci_readl(host, SDHCI_TEGRA_VENDOR_MISC_CTRL);
> - if (cmd && cmd->busy_timeout >= 11 * HZ)
> + if (cmd && cmd->busy_timeout >= 11 * MSECS_PER_SEC)
> val |= SDHCI_MISC_CTRL_ERASE_TIMEOUT_LIMIT;
> else
> val &= ~SDHCI_MISC_CTRL_ERASE_TIMEOUT_LIMIT;
> --
> 2.28.0