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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 12 Jan 2023 05:44:33 -0800
From:   Piyush Malgujar <pmalgujar@...vell.com>
To:     Adrian Hunter <adrian.hunter@...el.com>
CC:     <linux-mmc@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <ulf.hansson@...aro.org>, <robh+dt@...nel.org>,
        <krzysztof.kozlowski+dt@...aro.org>,
        <yamada.masahiro@...ionext.com>, <devicetree@...r.kernel.org>,
        <jannadurai@...vell.com>, <cchavva@...vell.com>
Subject: Re: [PATCH 4/5] drivers: mmc: sdhci: Add option to configure sdhci
 timeout

Hi Adrian,

Thanks for the review comments.

On Wed, Jan 11, 2023 at 10:08:26AM +0200, Adrian Hunter wrote:
> On 19/12/22 16:24, Piyush Malgujar wrote:
> > From: Jayanthi Annadurai <jannadurai@...vell.com>
> > 
> > Add config option to choose the sdhci timeout in seconds.
> 
> This approach is not ok, but why is the change wanted?
> 

This option was just to give flexibility to opt for a different timeout value based
on requirement, for instance, to decrease the time of tuning process. 
Although it is not a mandatory change, we can remove this option and go with the
default one.

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

Thanks,
Piyush 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ