]> git.baikalelectronics.ru Git - kernel.git/commit
Revert "mmc: core: do not retry CMD6 in __mmc_switch()"
authorJan Kaisrlik <ja.kaisrlik@gmail.com>
Tue, 20 Aug 2019 11:42:29 +0000 (13:42 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 3 Sep 2019 14:53:28 +0000 (16:53 +0200)
commitcd0641c5c30b42a7353b02de38967ecbeecdba1f
tree2aacf017eb99a6c0d4515e67c0505fa7f608e2a2
parent8a9d99520c17c557e8eba8e3fb857089f0033021
Revert "mmc: core: do not retry CMD6 in __mmc_switch()"

Turns out the commit 112f3c1310f2 ("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: 112f3c1310f2 ("mmc: core: do not retry CMD6 in __mmc_switch()")
Cc: stable@vger.kernel.org
Signed-off-by: Jan Kaisrlik <ja.kaisrlik@gmail.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/core/mmc_ops.c