public inbox for linux-tegra@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH] mmc: sdhci: tegra: fix wrong unit with busy_timeout
@ 2020-11-13 12:53 Wolfram Sang
  2020-11-13 16:38 ` Thierry Reding
  0 siblings, 1 reply; 5+ messages in thread
From: Wolfram Sang @ 2020-11-13 12:53 UTC (permalink / raw)
  To: linux-mmc
  Cc: Wolfram Sang, Adrian Hunter, Ulf Hansson, Thierry Reding,
	Jonathan Hunter, linux-tegra

'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(-)

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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-11-14  0:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-13 12:53 [RFC PATCH] mmc: sdhci: tegra: fix wrong unit with busy_timeout Wolfram Sang
2020-11-13 16:38 ` Thierry Reding
2020-11-13 18:34   ` Sowjanya Komatineni
2020-11-13 19:57     ` Thierry Reding
2020-11-14  0:15       ` Wolfram Sang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox