* [PATCH 5.10] mmc: core: Fix UHS-I SD 1.8V workaround branch
@ 2022-09-06 6:08 Adrian Hunter
2022-09-06 12:02 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Adrian Hunter @ 2022-09-06 6:08 UTC (permalink / raw)
To: stable; +Cc: Ulf Hansson, Seunghui Lee
commit 15c56208c79c340686869c31595c209d1431c5e8 upstream.
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".
Fixes: 045d705dc1fb ("mmc: core: Enable the MMC host software queue for the SD card")
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Seunghui 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: Ulf Hansson <ulf.hansson@linaro.org>
[Backport to 5.10]
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
---
drivers/mmc/core/sd.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c
index bac343a8d569..0b09cdaaeb6c 100644
--- a/drivers/mmc/core/sd.c
+++ b/drivers/mmc/core/sd.c
@@ -1107,7 +1107,7 @@ static int mmc_sd_init_card(struct mmc_host *host, u32 ocr,
mmc_remove_card(card);
goto retry;
}
- goto done;
+ goto cont;
}
}
@@ -1143,7 +1143,7 @@ static int mmc_sd_init_card(struct mmc_host *host, u32 ocr,
mmc_set_bus_width(host, MMC_BUS_WIDTH_4);
}
}
-
+cont:
if (host->cqe_ops && !host->cqe_enabled) {
err = host->cqe_ops->cqe_enable(host, card);
if (!err) {
@@ -1161,7 +1161,7 @@ static int mmc_sd_init_card(struct mmc_host *host, u32 ocr,
err = -EINVAL;
goto free_card;
}
-done:
+
host->card = card;
return 0;
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 5.10] mmc: core: Fix UHS-I SD 1.8V workaround branch
2022-09-06 6:08 [PATCH 5.10] mmc: core: Fix UHS-I SD 1.8V workaround branch Adrian Hunter
@ 2022-09-06 12:02 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2022-09-06 12:02 UTC (permalink / raw)
To: Adrian Hunter; +Cc: stable, Ulf Hansson, Seunghui Lee
On Tue, Sep 06, 2022 at 09:08:34AM +0300, Adrian Hunter wrote:
> commit 15c56208c79c340686869c31595c209d1431c5e8 upstream.
>
> 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".
>
> Fixes: 045d705dc1fb ("mmc: core: Enable the MMC host software queue for the SD card")
> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
> Reviewed-by: Seunghui 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: Ulf Hansson <ulf.hansson@linaro.org>
> [Backport to 5.10]
> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
> ---
> drivers/mmc/core/sd.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Now queued up, thanks.
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-09-06 12:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-06 6:08 [PATCH 5.10] mmc: core: Fix UHS-I SD 1.8V workaround branch Adrian Hunter
2022-09-06 12:02 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox