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]
Message-ID: <CAPDyKFqg7gDXMKyDXa_oczfkjqEAcsyL-9YJWHE9wA2sY0BGfg@mail.gmail.com>
Date:   Mon, 15 Aug 2022 20:28:04 +0200
From:   Ulf Hansson <ulf.hansson@...aro.org>
To:     Wenbin Mei <wenbin.mei@...iatek.com>
Cc:     Matthias Brugger <matthias.bgg@...il.com>,
        Chaotian Jing <chaotian.jing@...iatek.com>,
        linux-mmc@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-mediatek@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mmc: mtk-sd: Clear interrupts when cqe off/disable

On Thu, 28 Jul 2022 at 10:01, Wenbin Mei <wenbin.mei@...iatek.com> wrote:
>
> Currently we don't clear MSDC interrupts when cqe off/disable, which led
> to the data complete interrupt will be reserved for the next command.
> If the next command with data transfer after cqe off/disable, we process
> the CMD ready interrupt and trigger DMA start for data, but the data
> complete interrupt is already exists, then SW assume that the data transfer
> is complete, SW will trigger DMA stop, but the data may not be transmitted
> yet or is transmitting, so we may encounter the following error:
> mtk-msdc 11230000.mmc: CMD bus busy detected.
>
> Signed-off-by: Wenbin Mei <wenbin.mei@...iatek.com>

Applied for fixes and by adding the below tags, thanks!

Fixes: 88bd652b3c74 ("mmc: mediatek: command queue support")
Cc: stable@...r.kernel.org

Kind regards
Uffe


> ---
>  drivers/mmc/host/mtk-sd.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
> index 4ff73d1883de..69d78604d1fc 100644
> --- a/drivers/mmc/host/mtk-sd.c
> +++ b/drivers/mmc/host/mtk-sd.c
> @@ -2446,6 +2446,9 @@ static void msdc_cqe_disable(struct mmc_host *mmc, bool recovery)
>         /* disable busy check */
>         sdr_clr_bits(host->base + MSDC_PATCH_BIT1, MSDC_PB1_BUSY_CHECK_SEL);
>
> +       val = readl(host->base + MSDC_INT);
> +       writel(val, host->base + MSDC_INT);
> +
>         if (recovery) {
>                 sdr_set_field(host->base + MSDC_DMA_CTRL,
>                               MSDC_DMA_CTRL_STOP, 1);
> @@ -2932,11 +2935,14 @@ static int __maybe_unused msdc_suspend(struct device *dev)
>         struct mmc_host *mmc = dev_get_drvdata(dev);
>         struct msdc_host *host = mmc_priv(mmc);
>         int ret;
> +       u32 val;
>
>         if (mmc->caps2 & MMC_CAP2_CQE) {
>                 ret = cqhci_suspend(mmc);
>                 if (ret)
>                         return ret;
> +               val = readl(host->base + MSDC_INT);
> +               writel(val, host->base + MSDC_INT);
>         }
>
>         /*
> --
> 2.25.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ