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: <CA+Da2qzr0SBu-kUtFTnBqT+OObFOSTFgmU30L3B-Rjv3rYbGKw@mail.gmail.com>
Date:   Thu, 14 Sep 2023 16:00:32 +0800
From:   Wenchao Chen <wenchao.chen666@...il.com>
To:     Michael Wu <michael@...winnertech.com>
Cc:     ulf.hansson@...aro.org, CLoehle@...erstone.com,
        adrian.hunter@...el.com, jinpu.wang@...os.com, hare@...e.de,
        victor.shih@...esyslogic.com.tw, avri.altman@....com,
        asuk4.q@...il.com, axboe@...nel.dk, brauner@...nel.org,
        f.fainelli@...il.com, beanhuo@...ron.com,
        linux-mmc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mmc: core: Add new flag to force hardware reset

On Thu, 14 Sept 2023 at 08:04, Michael Wu <michael@...winnertech.com> wrote:
>
> Entering the recovery system itself indicates a transmission error.
> In this situation, we intend to execute the mmc_blk_reset function
> to clear any anomalies that may be caused by errors. We have previously
> discussed with several MMC device manufacturers, and they expressed
> their desire for us to reset the device when errors occur to ensure
> stable operation. We aim to make this code compatible with all devices
> and ensure its stable performance, so we would like to add this patch
>
> Signed-off-by: Michael Wu <michael@...winnertech.com>

like: https://lore.kernel.org/linux-mmc/20220603051534.22672-1-quic_sartgarg@quicinc.com/

You should enable it in the vendor host.

> ---
>  drivers/mmc/core/block.c | 2 +-
>  include/linux/mmc/host.h | 1 +
>  2 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c
> index b5b414a71e0b..29fbe0ddeadb 100644
> --- a/drivers/mmc/core/block.c
> +++ b/drivers/mmc/core/block.c
> @@ -1503,7 +1503,7 @@ void mmc_blk_cqe_recovery(struct mmc_queue *mq)
>         pr_debug("%s: CQE recovery start\n", mmc_hostname(host));
>
>         err = mmc_cqe_recovery(host);
> -       if (err)
> +       if (err || host->cqe_recovery_reset_always)
>                 mmc_blk_reset(mq->blkdata, host, MMC_BLK_CQE_RECOVERY);
>         mmc_blk_reset_success(mq->blkdata, MMC_BLK_CQE_RECOVERY);
>
> diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
> index 62a6847a3b6f..f578541a06b5 100644
> --- a/include/linux/mmc/host.h
> +++ b/include/linux/mmc/host.h
> @@ -518,6 +518,7 @@ struct mmc_host {
>         int                     cqe_qdepth;
>         bool                    cqe_enabled;
>         bool                    cqe_on;
> +       bool                    cqe_recovery_reset_always;
>
>         /* Inline encryption support */
>  #ifdef CONFIG_MMC_CRYPTO
> --
> 2.29.0
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ