mmc: core: Do a power cycle when the CMD11 fails
authorDooHyun Hwang <dh0421.hwang@samsung.com>
Wed, 10 Feb 2021 04:59:36 +0000 (13:59 +0900)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 30 Mar 2021 09:41:57 +0000 (11:41 +0200)
commit147186f531ae49c18b7a9091a2c40e83b3d95649
tree0e0caa404ff531007bb33c8cddc5814a6266928b
parenta5e13c6df0e41702d2b2c77c8ad41677ebb065b3
mmc: core: Do a power cycle when the CMD11 fails

A CMD11 is sent to the SD/SDIO card to start the voltage switch procedure
into 1.8V I/O. According to the SD spec a power cycle is needed of the
card, if it turns out that the CMD11 fails. Let's fix this, to allow a
retry of the initialization without the voltage switch, to succeed.

Note that, whether it makes sense to also retry with the voltage switch
after the power cycle is a bit more difficult to know. At this point, we
treat it like the CMD11 isn't supported and therefore we skip it when
retrying.

Signed-off-by: DooHyun Hwang <dh0421.hwang@samsung.com>
Link: https://lore.kernel.org/r/20210210045936.7809-1-dh0421.hwang@samsung.com
Cc: stable@vger.kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/core/core.c