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

Commit b45868d6 authored by Adrian Hunter's avatar Adrian Hunter Committed by Lee Jones
Browse files

BACKPORT: mmc: core: Fix UHS-I SD 1.8V workaround branch



When introduced, upon success, the 1.8V fixup workaround in
mmc_sd_init_card() would branch to practically the end of the function, to
a label named "done". Unfortunately, perhaps due to the label name, over
time new code has been added that really should have come after "done" not
before it. Let's fix the problem by moving the label to the correct place
and rename it "cont".

Bug: 254441685
Fixes: 045d705dc1fb ("mmc: core: Enable the MMC host software queue for the SD card")
Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
Reviewed-by: default avatarSeunghui Lee <sh043.lee@samsung.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20220815073321.63382-2-adrian.hunter@intel.com


Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
(cherry picked from commit 15c56208c79c340686869c31595c209d1431c5e8)
Signed-off-by: default avatarLee Jones <joneslee@google.com>
Change-Id: I95b5445f74710ac4623611efb7f3cba59b2264a9
parent 4f0ce36d
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -1053,7 +1053,7 @@ static int mmc_sd_init_card(struct mmc_host *host, u32 ocr,
					mmc_remove_card(card);
					mmc_remove_card(card);
				goto retry;
				goto retry;
			}
			}
			goto done;
			goto cont;
		}
		}
	}
	}


@@ -1090,6 +1090,7 @@ static int mmc_sd_init_card(struct mmc_host *host, u32 ocr,
		}
		}
	}
	}


cont:
	if (host->cqe_ops && !host->cqe_enabled) {
	if (host->cqe_ops && !host->cqe_enabled) {
		err = host->cqe_ops->cqe_enable(host, card);
		err = host->cqe_ops->cqe_enable(host, card);
		if (!err) {
		if (!err) {
@@ -1107,7 +1108,7 @@ static int mmc_sd_init_card(struct mmc_host *host, u32 ocr,
		err = -EINVAL;
		err = -EINVAL;
		goto free_card;
		goto free_card;
	}
	}
done:

	host->card = card;
	host->card = card;
	return 0;
	return 0;