mmc: sdhci: Issue ACMD12 for SD and MMC only
Pavan Kunapuli [Mon, 7 Jan 2013 15:34:23 +0000 (20:34 +0530)]
Auto CMD 12 should be issued for multi block read and write of MMC
and SD cards only.

Bug 1211829

Change-Id: I88d18d8f35309299654239d1774b3167710b9d74
Signed-off-by: Pavan Kunapuli <pkunapuli@nvidia.com>
Reviewed-on: http://git-master/r/189207
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>

drivers/mmc/host/sdhci.c

index 54c115a..dccd8c6 100644 (file)
@@ -881,7 +881,8 @@ static void sdhci_set_transfer_mode(struct sdhci_host *host,
                 * If we are sending CMD23, CMD12 never gets sent
                 * on successful completion (so no Auto-CMD12).
                 */
-               if (!host->mrq->sbc && (host->flags & SDHCI_AUTO_CMD12))
+               if (!host->mrq->sbc && (host->flags & SDHCI_AUTO_CMD12) &&
+                       mmc_op_multi(cmd->opcode))
                        mode |= SDHCI_TRNS_AUTO_CMD12;
                else if (host->mrq->sbc && (host->flags & SDHCI_AUTO_CMD23)) {
                        mode |= SDHCI_TRNS_AUTO_CMD23;