From: Sowjanya Komatineni <skomatineni@nvidia.com>
To: Thierry Reding <thierry.reding@gmail.com>,
Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: <linux-mmc@vger.kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>,
"Ulf Hansson" <ulf.hansson@linaro.org>,
Jonathan Hunter <jonathanh@nvidia.com>,
<linux-tegra@vger.kernel.org>
Subject: Re: [RFC PATCH] mmc: sdhci: tegra: fix wrong unit with busy_timeout
Date: Fri, 13 Nov 2020 10:34:27 -0800 [thread overview]
Message-ID: <728ad4ee-c5a2-65a6-c037-689bc77acbdf@nvidia.com> (raw)
In-Reply-To: <20201113163846.GF1408970@ulmo>
On 11/13/20 8:38 AM, Thierry Reding wrote:
> 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
Thanks Wolfram.
Right cmd busy_timeout is in msec and we have to enable
ERASE_TIMEOUT_LIMIT bit for more than 11s busy operations.
So it should be MSEC_PER_SEC.
>
>> 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
next prev parent reply other threads:[~2020-11-13 18:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2020-11-13 19:57 ` Thierry Reding
2020-11-14 0:15 ` Wolfram Sang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=728ad4ee-c5a2-65a6-c037-689bc77acbdf@nvidia.com \
--to=skomatineni@nvidia.com \
--cc=adrian.hunter@intel.com \
--cc=jonathanh@nvidia.com \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=thierry.reding@gmail.com \
--cc=ulf.hansson@linaro.org \
--cc=wsa+renesas@sang-engineering.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox