mmc: core: fix using wrong io voltage if mmc_select_hs200 fails
authorDong Aisheng <aisheng.dong@nxp.com>
Wed, 20 Apr 2016 16:51:30 +0000 (00:51 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 10 May 2016 08:37:01 +0000 (10:37 +0200)
commite51534c806609c806d81bfb034f02737461f855c
treea4cb5c110e891d700b80424c7c2b44a6270fe5af
parent802ac39a55664b15dd162e3444d5be34045abeeb
mmc: core: fix using wrong io voltage if mmc_select_hs200 fails

Currently MMC core will keep going if HS200/HS timing switch failed
with -EBADMSG error by the assumption that the old timing is still valid.

However, for mmc_select_hs200 case, the signal voltage may have already
been switched. If the timing switch failed, we should fall back to
the old voltage in case the card is continue run with legacy timing.

If fall back signal voltage failed, we explicitly report an EIO error
to force retry during the next power cycle.

Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/core/mmc.c