]> git.ipfire.org Git - thirdparty/u-boot.git/commit
mmc: Fix retry logic in sd_get_capabilities
authorYanir Levin <yanir.levin@tandemg.com>
Thu, 22 Jan 2026 02:32:06 +0000 (10:32 +0800)
committerPeng Fan <peng.fan@nxp.com>
Thu, 22 Jan 2026 02:38:50 +0000 (10:38 +0800)
commit124aeeff837d20374ec00e292c31444b67b7a971
treef67f48b2eca26310844d2c4f024a447e142e4227
parent0e6ed6117552e6b0ba8675980ef9580fea2ae3ac
mmc: Fix retry logic in sd_get_capabilities

In sd_get_capabilities an ACMD is sent (SD_CMD_APP_SEND_SCR),
which requires sending APP_CMD (MMC_CMD_APP_CMD) before.

Currently, the ACMD is retried on error, however APP_CMD isn't.
In this case, when the ACMD fails and it is tried again,
the retry attempts will not be handled as ACMD, which is wrong.

The fix performs the retry attempts on the sequence of
APP_CMD and the ACMD together.

Signed-off-by: Yanir Levin <yanir.levin@tandemg.com>
Reviewed-by: Eran Moshe <emoshe@gsitechnology.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
drivers/mmc/mmc.c