Merge "mmc: core: power cycle card when sd card switch voltage operation fails"

This commit is contained in:
Linux Build Service Account 2018-05-02 13:38:37 -07:00 committed by Gerrit - the friendly Code Review server
commit db7e413924

View file

@ -3011,8 +3011,16 @@ int mmc_set_signal_voltage(struct mmc_host *host, int signal_voltage, u32 ocr)
*/ */
mmc_host_clk_hold(host); mmc_host_clk_hold(host);
err = mmc_wait_for_cmd(host, &cmd, 0); err = mmc_wait_for_cmd(host, &cmd, 0);
if (err) if (err) {
goto err_command; 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)) { if (!mmc_host_is_spi(host) && (cmd.resp[0] & R1_ERROR)) {
err = -EIO; err = -EIO;