From: Adrian Hunter <adrian.hunter@intel.com>
To: Adrian Hunter <adrian.hunter@intel.com>
Cc: Chris Ball <cjb@laptop.org>, linux-mmc@vger.kernel.org
Subject: Re: [PATCH] mmc: sdhci: Allow for long command timeouts
Date: Mon, 13 Jan 2014 09:06:01 +0200 [thread overview]
Message-ID: <52D39059.5080504@intel.com> (raw)
In-Reply-To: <52AAE541.6090606@intel.com>
Ping?
On 13/12/13 12:45, Adrian Hunter wrote:
> Hi Chris
>
> What about this one?
>
> Regards
> Adrian
>
> On 14/11/13 10:16, Adrian Hunter wrote:
>> The driver has a timer with a 10 second
>> timeout to catch devices that stop responding.
>> However it is possible for commands to take
>> even longer than that. Change the timer
>> timeout to reflect the command timeout.
>>
>> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
>> ---
>> drivers/mmc/host/sdhci.c | 7 ++++++-
>> 1 file changed, 6 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
>> index bd8a098..614a34d 100644
>> --- a/drivers/mmc/host/sdhci.c
>> +++ b/drivers/mmc/host/sdhci.c
>> @@ -1013,7 +1013,12 @@ void sdhci_send_command(struct sdhci_host *host, struct mmc_command *cmd)
>> mdelay(1);
>> }
>>
>> - mod_timer(&host->timer, jiffies + 10 * HZ);
>> + timeout = jiffies;
>> + if (!cmd->data && cmd->cmd_timeout_ms > 9000)
>> + timeout += DIV_ROUND_UP(cmd->cmd_timeout_ms, 1000) * HZ + HZ;
>> + else
>> + timeout += 10 * HZ;
>> + mod_timer(&host->timer, timeout);
>>
>> host->cmd = cmd;
>>
>>
>
>
>
next prev parent reply other threads:[~2014-01-13 7:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-14 8:16 [PATCH] mmc: sdhci: Allow for long command timeouts Adrian Hunter
2013-12-13 10:45 ` Adrian Hunter
2014-01-13 7:06 ` Adrian Hunter [this message]
2014-01-20 6:17 ` Adrian Hunter
2014-01-20 15:36 ` Chris Ball
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=52D39059.5080504@intel.com \
--to=adrian.hunter@intel.com \
--cc=cjb@laptop.org \
--cc=linux-mmc@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).