Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b62e0066 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

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

parents 22c33e60 09333d5f
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -2968,8 +2968,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;