Skip to contentSkip to conversation

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

PATCH In review Adrian Hunter 2 participants 2 messages Sep 6, 2022 Stable branch

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mmc: core: Fix UHS-I SD 1.8V workaround branch

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")
[Backport to 5.10]
---
 drivers/mmc/core/sd.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/mmc/core/sd.c +3 -3
index bac343a8d569..0b09cdaaeb6c 100644
@@ -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;
 
Signature · 1 line
2.25.1
maintainer
#1 lore raw
Quoted 17 lines · Adrian Hunter

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")
[Backport to 5.10]
Quoted 3 lines
---
 drivers/mmc/core/sd.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Now queued up, thanks.

greg k-h