lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221219142418.27949-5-pmalgujar@marvell.com>
Date:   Mon, 19 Dec 2022 06:24:17 -0800
From:   Piyush Malgujar <pmalgujar@...vell.com>
To:     <linux-mmc@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <adrian.hunter@...el.com>, <ulf.hansson@...aro.org>,
        <robh+dt@...nel.org>, <krzysztof.kozlowski+dt@...aro.org>,
        <yamada.masahiro@...ionext.com>, <devicetree@...r.kernel.org>
CC:     <jannadurai@...vell.com>, <cchavva@...vell.com>,
        Piyush Malgujar <pmalgujar@...vell.com>
Subject: [PATCH 4/5] drivers: mmc: sdhci: Add option to configure sdhci timeout

From: Jayanthi Annadurai <jannadurai@...vell.com>

Add config option to choose the sdhci timeout in seconds.

Signed-off-by: Jayanthi Annadurai <jannadurai@...vell.com>
Signed-off-by: Piyush Malgujar <pmalgujar@...vell.com>
---
 drivers/mmc/host/Kconfig | 8 ++++++++
 drivers/mmc/host/sdhci.c | 3 ++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
index b5b2ae0bb4625bdb9d17acdbb1887c9caa3a1f32..ab48f2bc4cff73d1aad8d7da542d761cf0346d9f 100644
--- a/drivers/mmc/host/Kconfig
+++ b/drivers/mmc/host/Kconfig
@@ -1132,3 +1132,11 @@ config MMC_LITEX
 	  module will be called litex_mmc.
 
 	  If unsure, say N.
+
+config MMC_SDHCI_TIMEOUT
+	int
+	default 1 if MMC_SDHCI_CADENCE
+	default 10
+	depends on MMC_SDHCI
+	help
+	  Default timeout value for command and data.
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index f3af1bd0f7b955272fbd8b034ecb591860b89aed..e9bc24258746834ec9c8f13fe24456587a2b758d 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -1707,7 +1707,8 @@ static bool sdhci_send_command(struct sdhci_host *host, struct mmc_command *cmd)
 	else if (!cmd->data && cmd->busy_timeout > 9000)
 		timeout += DIV_ROUND_UP(cmd->busy_timeout, 1000) * HZ + HZ;
 	else
-		timeout += 10 * HZ;
+		timeout += CONFIG_MMC_SDHCI_TIMEOUT * HZ;
+
 	sdhci_mod_timer(host, cmd->mrq, timeout);
 
 	if (host->use_external_dma)
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ