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] [day] [month] [year] [list]
Date:   Thu, 8 Jun 2023 17:53:07 +0200
From:   Ulf Hansson <ulf.hansson@...aro.org>
To:     Christian Loehle <CLoehle@...erstone.com>
Cc:     "linux-mmc@...r.kernel.org" <linux-mmc@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Adrian Hunter <adrian.hunter@...el.com>,
        Avri Altman <avri.altman@....com>
Subject: Re: [PATCHv2 1/2] mmc: block: ioctl: do write error check for spi

On Thu, 25 May 2023 at 11:56, Christian Loehle <CLoehle@...erstone.com> wrote:
>
> SPI doesn't have the usual PROG path we can check for error bits
> after moving back to TRAN. Instead it holds the line LOW until
> completion. We can then check if the card shows any errors or
> is in IDLE state, indicating the line is no longer LOW because
> the card was reset.
>
> Signed-off-by: Christian Loehle <cloehle@...erstone.com>

Applied for next and by adding stable tag, thanks!

Kind regards
Uffe


> ---
>  drivers/mmc/core/block.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c
> index d920c4178389..e46330815484 100644
> --- a/drivers/mmc/core/block.c
> +++ b/drivers/mmc/core/block.c
> @@ -178,6 +178,7 @@ static void mmc_blk_rw_rq_prep(struct mmc_queue_req *mqrq,
>                                int recovery_mode,
>                                struct mmc_queue *mq);
>  static void mmc_blk_hsq_req_done(struct mmc_request *mrq);
> +static int mmc_spi_err_check(struct mmc_card *card);
>
>  static struct mmc_blk_data *mmc_blk_get(struct gendisk *disk)
>  {
> @@ -608,6 +609,11 @@ static int __mmc_blk_ioctl_cmd(struct mmc_card *card, struct mmc_blk_data *md,
>         if ((card->host->caps & MMC_CAP_WAIT_WHILE_BUSY) && use_r1b_resp)
>                 return 0;
>
> +       if (mmc_host_is_spi(card->host)) {
> +               if (idata->ic.write_flag || r1b_resp || cmd.flags & MMC_RSP_SPI_BUSY)
> +                       return mmc_spi_err_check(card);
> +               return err;
> +       }
>         /* Ensure RPMB/R1B command has completed by polling with CMD13. */
>         if (idata->rpmb || r1b_resp)
>                 err = mmc_poll_for_busy(card, busy_timeout_ms, false,
> --
> 2.37.3
>
>
> Hyperstone GmbH | Reichenaustr. 39a  | 78467 Konstanz
> Managing Director: Dr. Jan Peter Berns.
> Commercial register of local courts: Freiburg HRB381782
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ