mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
mmc: sdhci: Allow for long command timeouts
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 <[email protected]> Signed-off-by: Chris Ball <[email protected]>
This commit is contained in:
parent
e5624054c1
commit
3e1a689248
1 changed files with 6 additions and 1 deletions
|
|
@ -1018,7 +1018,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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue