Skip to content

Commit 8ad8e02

Browse files
Kaisrlikstorulf
authored andcommitted
Revert "mmc: core: do not retry CMD6 in __mmc_switch()"
Turns out the commit 3a0681c ("mmc: core: do not retry CMD6 in __mmc_switch()") breaks initialization of a Toshiba THGBMNG5 eMMC card, when using the meson-gx-mmc.c driver on a custom board based on Amlogic A113D. The CMD6 that switches the card into HS200 mode is then one that fails and according to the below printed messages from the log: [ 1.648951] mmc0: mmc_select_hs200 failed, error -84 [ 1.648988] mmc0: error -84 whilst initialising MMC card After some analyze, it turns out that adding a delay of ~5ms inside mmc_select_bus_width() but after mmc_compare_ext_csds() has been executed, also fixes the problem. Adding yet some more debug code, trying to figure out if potentially the card could be in a busy state, both by using CMD13 and ->card_busy() ops concluded that this was not the case. Therefore, let's simply revert the commit that dropped support for retrying of CMD6, as this also fixes the problem. Fixes: 3a0681c ("mmc: core: do not retry CMD6 in __mmc_switch()") Cc: [email protected] Signed-off-by: Jan Kaisrlik <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
1 parent 089cf7f commit 8ad8e02

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/mmc/core/mmc_ops.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ int __mmc_switch(struct mmc_card *card, u8 set, u8 index, u8 value,
564564
if (index == EXT_CSD_SANITIZE_START)
565565
cmd.sanitize_busy = true;
566566

567-
err = mmc_wait_for_cmd(host, &cmd, 0);
567+
err = mmc_wait_for_cmd(host, &cmd, MMC_CMD_RETRIES);
568568
if (err)
569569
goto out;
570570

0 commit comments

Comments
 (0)