lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPDyKFrhXEA73pb1eiehFN=tqj9CqVj4jxRKVYRVnmVd4fxNvA@mail.gmail.com>
Date:   Tue, 24 Aug 2021 16:56:58 +0200
From:   Ulf Hansson <ulf.hansson@...aro.org>
To:     Bean Huo <huobean@...il.com>
Cc:     Adrian Hunter <adrian.hunter@...el.com>,
        linux-mmc <linux-mmc@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Bean Huo <beanhuo@...ron.com>
Subject: Re: [PATCH v1 1/2] mmc: core: Issue HPI in case the BKOPS timed out

On Wed, 18 Aug 2021 at 00:42, Bean Huo <huobean@...il.com> wrote:
>
> From: Bean Huo <beanhuo@...ron.com>
>
> If the BKOPS timed out, the card is probably still busy in the
> R1_STATE_PRG. Rather than let application in the userland continue
> to wait, let's try to abort it with a HPI command to get back into
> R1_STATE_TRAN.
>
> Signed-off-by: Bean Huo <beanhuo@...ron.com>

Applied for next, thanks! I took the liberty of updating the commit
message a bit to clarify.

Kind regards
Uffe



> ---
>  drivers/mmc/core/mmc_ops.c | 11 +++++++++--
>  1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c
> index 90d213a2203f..0c54858e89c0 100644
> --- a/drivers/mmc/core/mmc_ops.c
> +++ b/drivers/mmc/core/mmc_ops.c
> @@ -959,8 +959,15 @@ void mmc_run_bkops(struct mmc_card *card)
>          */
>         err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,
>                          EXT_CSD_BKOPS_START, 1, MMC_BKOPS_TIMEOUT_MS);
> -       if (err)
> -               pr_warn("%s: Error %d starting bkops\n",
> +       /*
> +        * If the BKOPS timed out, the card is probably still busy in the
> +        * R1_STATE_PRG. Rather than continue to wait, let's try to abort
> +        * it with a HPI command to get back into R1_STATE_TRAN.
> +        */
> +       if (err == -ETIMEDOUT && !mmc_interrupt_hpi(card))
> +               pr_warn("%s: BKOPS aborted\n", mmc_hostname(card->host));
> +       else if (err)
> +               pr_warn("%s: Error %d running bkops\n",
>                         mmc_hostname(card->host), err);
>
>         mmc_retune_release(card->host);
> --
> 2.25.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ