summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/mmc/core/core.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 2af0e819d0cb..547d18c9feef 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -3011,8 +3011,16 @@ int mmc_set_signal_voltage(struct mmc_host *host, int signal_voltage, u32 ocr)
*/
mmc_host_clk_hold(host);
err = mmc_wait_for_cmd(host, &cmd, 0);
- if (err)
- goto err_command;
+ if (err) {
+ if (err == -ETIMEDOUT) {
+ pr_debug("%s: voltage switching failed with err %d\n",
+ mmc_hostname(host), err);
+ err = -EAGAIN;
+ goto power_cycle;
+ } else {
+ goto err_command;
+ }
+ }
if (!mmc_host_is_spi(host) && (cmd.resp[0] & R1_ERROR)) {
err = -EIO;