Skip to content

Commit 901a6cf

Browse files
theStacksmb49
authored andcommitted
mmc: sdhci-esdhc-imx: correct CQHCI exit halt state check
BugLink: https://bugs.launchpad.net/bugs/2003896 commit a3cab1d upstream. 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]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Kamal Mostafa <[email protected]> Signed-off-by: Stefan Bader <[email protected]>
1 parent a1a71ef commit 901a6cf

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
@@ -1302,7 +1302,7 @@ static void esdhc_cqe_enable(struct mmc_host *mmc)
13021302
* system resume back.
13031303
*/
13041304
cqhci_writel(cq_host, 0, CQHCI_CTL);
1305-
if (cqhci_readl(cq_host, CQHCI_CTL) && CQHCI_HALT)
1305+
if (cqhci_readl(cq_host, CQHCI_CTL) & CQHCI_HALT)
13061306
dev_err(mmc_dev(host->mmc),
13071307
"failed to exit halt state when enable CQE\n");
13081308

0 commit comments

Comments
 (0)