[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPDyKFpQyoNELdh3FrFF++HXKjH_Tn9oaY=PzUXHcE8o=KK-hg@mail.gmail.com>
Date: Tue, 2 Mar 2021 11:38:40 +0100
From: Ulf Hansson <ulf.hansson@...aro.org>
To: DooHyun Hwang <dh0421.hwang@...sung.com>
Cc: "linux-mmc@...r.kernel.org" <linux-mmc@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Eric Biggers <ebiggers@...gle.com>,
Wolfram Sang <wsa+renesas@...g-engineering.com>,
Satya Tangirala <satyat@...gle.com>,
Ludovic Barre <ludovic.barre@...com>,
Linus Walleij <linus.walleij@...aro.org>,
grant.jung@...sung.com, jt77.jang@...sung.com,
junwoo80.lee@...sung.com, jangsub.yi@...sung.com,
sh043.lee@...sung.com, Chanwoo Lee <cw9316.lee@...sung.com>,
sh8267.baek@...sung.com, wkon.kim@...sung.com
Subject: Re: [PATCH] mmc: core: add a power cycle when CMD11 fails
On Wed, 10 Feb 2021 at 06:12, DooHyun Hwang <dh0421.hwang@...sung.com> wrote:
>
> A power cycle is required if CMD11 fails.
> CMD11 failure should be handled as no response.
>
> If there is a timeout error that means no response to the CMD11,
> do not send the CMD11 again and the power cycle is required.
> Any other errors for CMD11 are the same because CMD11 failed.
>
> On some bad SD Card, CMD11 may fail but the card may have already
> invoked the voltage switch sequence.
> In this case, it is necessary to retry without voltage switching
> after power cycle.
>
> Signed-off-by: DooHyun Hwang <dh0421.hwang@...sung.com>
Applied for next, thanks!
I took the liberty of updating the commit message a bit, to try to
clarify things. Moreover, I have tagged this for stable kernels.
BTW, did you try to force the error to -EAGAIN, to keep retrying for a
couple of times? If so, did it end up with the same kind of errors?
> ---
> drivers/mmc/core/core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
> index 1136b859ddd8..a6674df2a7bb 100644
> --- a/drivers/mmc/core/core.c
> +++ b/drivers/mmc/core/core.c
> @@ -1207,7 +1207,7 @@ int mmc_set_uhs_voltage(struct mmc_host *host, u32 ocr)
>
> err = mmc_wait_for_cmd(host, &cmd, 0);
> if (err)
> - return err;
> + goto power_cycle;
>
> if (!mmc_host_is_spi(host) && (cmd.resp[0] & R1_ERROR))
> return -EIO;
> --
> 2.29.0
>
Kind regards
Uffe
Powered by blists - more mailing lists