]> rtime.felk.cvut.cz Git - hercules2020/nv-tegra/linux-4.4.git/commitdiff
mmc: sdhci: Increase SW timeout for sanitize cmd
authorPavan Kunapuli <pkunapuli@nvidia.com>
Thu, 24 Oct 2013 13:24:41 +0000 (18:54 +0530)
committerPavan Kunapuli <pkunapuli@nvidia.com>
Tue, 5 May 2015 20:04:36 +0000 (13:04 -0700)
Sanitize cmds have very long busy wait times. Increasing the SW timeout
timer for sanitize cmd to ensure that the driver doesn't trigger
timeout in the middle of sanitize busy wait.

Bug 1385731
Bug 1392724
Bug 1484117

Reviewed-on: http://git-master/r/303361
Change-Id: Ibb73b27159508b2ae851032a6ea1432f76b1f384
Signed-off-by: Pavan Kunapuli <pkunapuli@nvidia.com>
Signed-off-by: Naveen Kumar Arepalli <naveenk@nvidia.com>
Reviewed-on: http://git-master/r/384773
(cherry picked from commit 021b596219b1f2ca280e239a8a8e64a3e8802ac8)
Reviewed-on: http://git-master/r/386119
(cherry picked from commit 7bb40d20b02ec1f7d46f9a2c2faf898b4245f8f7)
Signed-off-by: Pavan Kunapuli <pkunapuli@nvidia.com>
Reviewed-on: http://git-master/r/739254
Reviewed-by: Automatic_Commit_Validation_User
drivers/mmc/host/sdhci.c

index 12e166de439869a7c878459d1f8e196cfdd32d0f..570966b13bb532c8349b8fddc6b54cda142643c8 100644 (file)
@@ -1304,6 +1304,9 @@ void sdhci_send_command(struct sdhci_host *host, struct mmc_command *cmd)
        timeout = jiffies;
        if (!cmd->data && cmd->busy_timeout > 9000)
                timeout += DIV_ROUND_UP(cmd->busy_timeout, 1000) * HZ + HZ;
+       else if ((cmd->opcode == MMC_SWITCH) && (((cmd->arg >> 16) &
+               EXT_CSD_SANITIZE_START) == EXT_CSD_SANITIZE_START))
+               timeout += 100 * HZ;
        else
                timeout += 10 * HZ;
        mod_timer(&host->timer, timeout);