Re: [PATCH v2] mmc: sdhci-esdhc-imx: correct CQHCI exit halt state check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 21 Nov 2022 at 11:57, Sebastian Falbesoner
<sebastian.falbesoner@xxxxxxxxx> wrote:
>
> With the current logic the "failed to exit halt state" error would be
> shown even if any other bit than CQHCI_HALT was set in the CQHCI_CTL
> register, since the right hand side is always true. Fix this by using
> the correct operator (bit-wise instead of logical AND) to only check for
> the halt bit flag, which was obviously intended here.
>
> Fixes: 85236d2be844 ("mmc: sdhci-esdhc-imx: clear the HALT bit when enable CQE")
> Acked-by: Adrian Hunter <adrian.hunter@xxxxxxxxx>
> Signed-off-by: Sebastian Falbesoner <sebastian.falbesoner@xxxxxxxxx>

Applied for fixes, by adding Haibo's ack and a stable tag, thanks!

Kind regards
Uffe


> ---
> Changes in v2:
> - added fix tag and ack from Adrian Hunter
>
>  drivers/mmc/host/sdhci-esdhc-imx.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
> index 31ea0a2fce35..ffeb5759830f 100644
> --- a/drivers/mmc/host/sdhci-esdhc-imx.c
> +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
> @@ -1512,7 +1512,7 @@ static void esdhc_cqe_enable(struct mmc_host *mmc)
>          * system resume back.
>          */
>         cqhci_writel(cq_host, 0, CQHCI_CTL);
> -       if (cqhci_readl(cq_host, CQHCI_CTL) && CQHCI_HALT)
> +       if (cqhci_readl(cq_host, CQHCI_CTL) & CQHCI_HALT)
>                 dev_err(mmc_dev(host->mmc),
>                         "failed to exit halt state when enable CQE\n");
>
> --
> 2.34.1
>



[Index of Archives]     [Linux Memonry Technology]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux