Merge "mmc: core: power cycle card when sd card switch voltage operation fails"
This commit is contained in:
commit
db7e413924
1 changed files with 10 additions and 2 deletions
|
@ -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)
|
||||
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;
|
||||
|
|
Loading…
Add table
Reference in a new issue