Skip to content

Commit a3cab1d

Browse files
theStackstorulf
authored andcommitted
mmc: sdhci-esdhc-imx: correct CQHCI exit halt state check
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: 85236d2 ("mmc: sdhci-esdhc-imx: clear the HALT bit when enable CQE") Signed-off-by: Sebastian Falbesoner <[email protected]> Acked-by: Haibo Chen <[email protected]> Acked-by: Adrian Hunter <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
1 parent 489d144 commit a3cab1d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/mmc/host/sdhci-esdhc-imx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1512,7 +1512,7 @@ static void esdhc_cqe_enable(struct mmc_host *mmc)
15121512
* system resume back.
15131513
*/
15141514
cqhci_writel(cq_host, 0, CQHCI_CTL);
1515-
if (cqhci_readl(cq_host, CQHCI_CTL) && CQHCI_HALT)
1515+
if (cqhci_readl(cq_host, CQHCI_CTL) & CQHCI_HALT)
15161516
dev_err(mmc_dev(host->mmc),
15171517
"failed to exit halt state when enable CQE\n");
15181518

0 commit comments

Comments
 (0)