am654_sdhci: mmc fail to send stop cmd
Jaehoon Chung
jh80.chung at samsung.com
Tue Jul 21 01:23:15 CEST 2020
On 7/20/20 10:21 AM, Peng Fan wrote:
> Hi Jan,
>
>> Subject: am654_sdhci: mmc fail to send stop cmd
>>
>> Hi all,
>>
>> on one device with one specific SD-card (possibly an aging one), I'm seeing
>> frequent "mmc fail to send stop cmd" messages, followed by read errors
>> when loading kernel and dtb. -ETIMEDOUT is returned by mmd_send_cmd.
>> However, I can always resolve this by simply retrying the stop command like
>> this:
>>
>> diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index
>> f36d11ddc8..9019d9f2ed 100644
>> --- a/drivers/mmc/mmc.c
>> +++ b/drivers/mmc/mmc.c
>> @@ -406,7 +406,11 @@ static int mmc_read_blocks(struct mmc *mmc, void
>> *dst, lbaint_t start, #if !defined(CONFIG_SPL_BUILD) ||
>> defined(CONFIG_SPL_LIBCOMMON_SUPPORT)
>> pr_err("mmc fail to send stop cmd\n"); #endif
>> - return 0;
>> + pr_err("retrying...\n");
>> + if (mmc_send_cmd(mmc, &cmd, NULL)) {
>> + pr_err("failed again\n");
>> + return 0;
>> + }
>> }
>> }
>>
>>
>> Hardware is our IOT2050, baseline is today's master (1c4b5038afcc) with
>> board-enabling and a bunch of patches from your tree [1]. However, already
>> 4d6da10ce611 exposes the problem.
>>
>> What could cause this?
>
> Where the timeout happen in driver?
>
> Did you try enlarge the timeout value?
how about adding SDHCI_QUIRK_WAIT_SEND_CMD?
And as Peng's comment, It needs to find where return error in driver code.
Best Regards,
Jaehoon Chung
>
> Regards,
> Peng.
>
>>
>> Jan
>>
>> [1]
>> https://protect2.fireeye.com/v1/url?k=89b609db-d478086f-89b78294-000babdfecba-7bc87eaa8a7f7725&q=1&e=eca6f3ac-3454-4f92-a074-5a4abe347b74&u=https%3A%2F%2Feur01.safelinks.protection.outlook.com%2F%3Furl%3Dhttps%253A%252F%252Fgithub.
>> com%2Fsiemens%2Fu-boot%2Fcommits%2Fjan%2Fiot2050&data=02%7
>> C01%7CPeng.Fan%40nxp.com%7Cda088100ee5a46cdc37008d82b29779f%7
>> C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C63730680439552710
>> 6&sdata=oiS6nOxxAQykjMyTecz%2FTJY4OW8WiZ2CbszR2mBrXuI%3D&
>> amp;reserved=0
More information about the U-Boot
mailing list