Skip to contentSkip to conversation

mmc: renesas_sdhi: abort tuning when timeout detected

PATCH Applied Lad Prabhakar 4 participants 4 messages Oct 29 – Nov 9

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mmc: renesas_sdhi: abort tuning when timeout detected

From: Wolfram Sang <[email protected]>

commit 2c9017d0b5d3fbf17e69577a42d9e610ca122810 upstream.

We have to bring the eMMC from sending-data state back to transfer state once we detected a CRC error (timeout) during tuning. So, send a stop command via mmc_abort_tuning().

Fixes 4f11997773b6 ("mmc: tmio: Add tuning support")

Reported-by Yoshihiro Shimoda <[email protected]>

---
 drivers/mmc/host/tmio_mmc_core.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/mmc/host/tmio_mmc_core.c +6 -1
index 72ac12eb89b0d..caefbacf56f5d 100644
@@ -745,13 +745,18 @@ static int tmio_mmc_execute_tuning(struct mmc_host *mmc, u32 opcode)
 
 	/* Issue CMD19 twice for each tap */
 	for (i = 0; i < 2 * host->tap_num; i++) {
+		int cmd_error = 0;
+
 		if (host->prepare_tuning)
 			host->prepare_tuning(host, i % host->tap_num);
 
-		ret = mmc_send_tuning(mmc, opcode, NULL);
+		ret = mmc_send_tuning(mmc, opcode, &cmd_error);
 		if (ret == 0)
 			set_bit(i, host->taps);
 
+		if (cmd_error)
+			mmc_abort_tuning(mmc, opcode);
+
 		usleep_range(1000, 1200);
 	}
 
Signature · 1 line
2.43.0
Reviewed-by on v1 1/1
#1 lore raw

Hi all,

Quoted 27 lines

-----Original Message-----
From: Lad Prabhakar <[email protected]>
Sent: Thursday, October 29, 2026 9:15 PM
To: [email protected]; iwamatsu nobuhiro(岩松 信洋 □DITC○ CPT) <[email protected]>; Pavel Machek <[email protected]>
Cc: Biju Das <[email protected]>
Subject: [PATCH 4.19.y-cip] mmc: renesas_sdhi: abort tuning when timeout detected

From: Wolfram Sang <[email protected]>

commit 2c9017d0b5d3fbf17e69577a42d9e610ca122810 upstream.

We have to bring the eMMC from sending-data state back to transfer state once we detected a CRC error (timeout) during tuning. So, send a stop command via mmc_abort_tuning().

Fixes 4f11997773b6 ("mmc: tmio: Add tuning support") Reported-by Yoshihiro

Shimoda <[email protected]>

Link:
https://lore.kernel.org/r/20210602073435.5955-1-wsa+renesas@sang-engine
ering.com

Quoted 7 lines
[PL: manually applied the changes]
---
 drivers/mmc/host/tmio_mmc_core.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

I reviewed this series, looks good to me.

Best regards,
Nobuhiro

Reviewed-by
#2 lore raw

Hi!

Quoted 22 lines
Quoted 14 lines

From: Wolfram Sang <[email protected]>

commit 2c9017d0b5d3fbf17e69577a42d9e610ca122810 upstream.

We have to bring the eMMC from sending-data state back to transfer state once we detected a CRC error (timeout) during tuning. So, send a stop command via mmc_abort_tuning().

Fixes 4f11997773b6 ("mmc: tmio: Add tuning support") Reported-by Yoshihiro

Shimoda <[email protected]>

Quoted 7 lines

Link:
https://lore.kernel.org/r/20210602073435.5955-1-wsa+renesas@sang-engine
ering.com

[PL: manually applied the changes]
Quoted 3 lines

I reviewed this series, looks good to me.

Patch looks okay to me, too. Adding Ulrich to the cc.

Best regards,
Pavel

Applied
#3 lore raw

Hi!

Quoted 23 lines · CET Pavel Machek via cip-dev
Quoted 22 lines
Quoted 21 lines

From: Wolfram Sang <[email protected]>

commit 2c9017d0b5d3fbf17e69577a42d9e610ca122810 upstream.

We have to bring the eMMC from sending-data state back to transfer state once we detected a CRC error (timeout) during tuning. So, send a stop command via mmc_abort_tuning().

Fixes 4f11997773b6 ("mmc: tmio: Add tuning support") Reported-by Yoshihiro

Shimoda <[email protected]>

Link:
https://lore.kernel.org/r/20210602073435.5955-1-wsa+renesas@sang-engine
ering.com

[PL: manually applied the changes]
Quoted 7 lines
Quoted 3 lines

I reviewed this series, looks good to me.

Patch looks okay to me, too. Adding Ulrich to the cc.

Applied, thanks.

CU
Uli