From: Jan Kiszka <jan.kiszka@web.de>
To: u-boot@lists.denx.de
Subject: am654_sdhci: mmc fail to send stop cmd
Date: Tue, 21 Jul 2020 08:36:31 +0200 [thread overview]
Message-ID: <f14a17a3-fd96-e726-177f-d4e979586cd6@web.de> (raw)
In-Reply-To: <42da5436-fd43-efd0-5a43-4e63226fbdc8@samsung.com>
On 21.07.20 01:23, Jaehoon Chung wrote:
> 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?
I tried that already, but the result was even worse, a non-working mmc.
> And as Peng's comment, It needs to find where return error in driver code.
>
As written in my other reply:
https://gitlab.denx.de/u-boot/u-boot/-/blob/f12341a9529540113f01989149bbbeb68662a829/drivers/mmc/sdhci.c#L385
Thus, it's reported by the hw.
Thanks,
Jan
next prev parent reply other threads:[~2020-07-21 6:36 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-18 14:47 am654_sdhci: mmc fail to send stop cmd Jan Kiszka
2020-07-20 1:21 ` Peng Fan
2020-07-20 4:39 ` Jan Kiszka
2020-07-20 23:23 ` Jaehoon Chung
2020-07-21 6:36 ` Jan Kiszka [this message]
2020-07-21 17:03 ` Faiz Abbas
2020-07-21 17:22 ` Jan Kiszka
2020-07-23 3:25 ` Faiz Abbas
2020-07-23 4:14 ` Faiz Abbas
2020-08-13 9:09 ` Jan Kiszka
2020-07-23 5:25 ` Jan Kiszka
2020-07-23 5:48 ` Jan Kiszka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f14a17a3-fd96-e726-177f-d4e979586cd6@web.de \
--to=jan.kiszka@web.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox