• Jan Kaisrlik's avatar
    Revert "mmc: core: do not retry CMD6 in __mmc_switch()" · 8ad8e02c
    Jan Kaisrlik authored
    Turns out the commit 3a0681c7 ("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: 3a0681c7 ("mmc: core: do not retry CMD6 in __mmc_switch()")
    Cc: stable@vger.kernel.org
    Signed-off-by: default avatarJan Kaisrlik <ja.kaisrlik@gmail.com>
    Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
    8ad8e02c
Name
Last commit
Last update
..
Kconfig Loading commit data...
Makefile Loading commit data...
block.c Loading commit data...
block.h Loading commit data...
bus.c Loading commit data...
bus.h Loading commit data...
card.h Loading commit data...
core.c Loading commit data...
core.h Loading commit data...
debugfs.c Loading commit data...
host.c Loading commit data...
host.h Loading commit data...
mmc.c Loading commit data...
mmc_ops.c Loading commit data...
mmc_ops.h Loading commit data...
mmc_test.c Loading commit data...
pwrseq.c Loading commit data...
pwrseq.h Loading commit data...
pwrseq_emmc.c Loading commit data...
pwrseq_sd8787.c Loading commit data...
pwrseq_simple.c Loading commit data...
queue.c Loading commit data...
queue.h Loading commit data...
quirks.h Loading commit data...
regulator.c Loading commit data...
sd.c Loading commit data...
sd.h Loading commit data...
sd_ops.c Loading commit data...
sd_ops.h Loading commit data...
sdio.c Loading commit data...
sdio_bus.c Loading commit data...
sdio_bus.h Loading commit data...
sdio_cis.c Loading commit data...
sdio_cis.h Loading commit data...
sdio_io.c Loading commit data...
sdio_irq.c Loading commit data...
sdio_ops.c Loading commit data...
sdio_ops.h Loading commit data...
sdio_uart.c Loading commit data...
slot-gpio.c Loading commit data...
slot-gpio.h Loading commit data...