Message ID | 20240829061823.3718-2-sh8267.baek@samsung.com |
---|---|
State | New |
Headers | show |
Series | mmc: cqhci: Fix for check CQHCI_HALT state. | expand |
On 29/08/24 09:18, Seunghwan Baek wrote: > To check if mmc cqe is in halt state, need to check set/clear of CQHCI_HALT > bit. At this time, we need to check with &, not &&. > > Fixes: a4080225f51d ("mmc: cqhci: support for command queue enabled host") > Cc: stable@vger.kernel.org > Signed-off-by: Seunghwan Baek <sh8267.baek@samsung.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> > --- > drivers/mmc/host/cqhci-core.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/mmc/host/cqhci-core.c b/drivers/mmc/host/cqhci-core.c > index c14d7251d0bb..a02da26a1efd 100644 > --- a/drivers/mmc/host/cqhci-core.c > +++ b/drivers/mmc/host/cqhci-core.c > @@ -617,7 +617,7 @@ static int cqhci_request(struct mmc_host *mmc, struct mmc_request *mrq) > cqhci_writel(cq_host, 0, CQHCI_CTL); > mmc->cqe_on = true; > pr_debug("%s: cqhci: CQE on\n", mmc_hostname(mmc)); > - if (cqhci_readl(cq_host, CQHCI_CTL) && CQHCI_HALT) { > + if (cqhci_readl(cq_host, CQHCI_CTL) & CQHCI_HALT) { > pr_err("%s: cqhci: CQE failed to exit halt state\n", > mmc_hostname(mmc)); > }
On Thu, 29 Aug 2024 at 08:18, Seunghwan Baek <sh8267.baek@samsung.com> wrote: > > To check if mmc cqe is in halt state, need to check set/clear of CQHCI_HALT > bit. At this time, we need to check with &, not &&. > > Fixes: a4080225f51d ("mmc: cqhci: support for command queue enabled host") > Cc: stable@vger.kernel.org > Signed-off-by: Seunghwan Baek <sh8267.baek@samsung.com> Applied for fixes, thanks! Kind regards Uffe > --- > drivers/mmc/host/cqhci-core.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/mmc/host/cqhci-core.c b/drivers/mmc/host/cqhci-core.c > index c14d7251d0bb..a02da26a1efd 100644 > --- a/drivers/mmc/host/cqhci-core.c > +++ b/drivers/mmc/host/cqhci-core.c > @@ -617,7 +617,7 @@ static int cqhci_request(struct mmc_host *mmc, struct mmc_request *mrq) > cqhci_writel(cq_host, 0, CQHCI_CTL); > mmc->cqe_on = true; > pr_debug("%s: cqhci: CQE on\n", mmc_hostname(mmc)); > - if (cqhci_readl(cq_host, CQHCI_CTL) && CQHCI_HALT) { > + if (cqhci_readl(cq_host, CQHCI_CTL) & CQHCI_HALT) { > pr_err("%s: cqhci: CQE failed to exit halt state\n", > mmc_hostname(mmc)); > } > -- > 2.17.1 >
diff --git a/drivers/mmc/host/cqhci-core.c b/drivers/mmc/host/cqhci-core.c index c14d7251d0bb..a02da26a1efd 100644 --- a/drivers/mmc/host/cqhci-core.c +++ b/drivers/mmc/host/cqhci-core.c @@ -617,7 +617,7 @@ static int cqhci_request(struct mmc_host *mmc, struct mmc_request *mrq) cqhci_writel(cq_host, 0, CQHCI_CTL); mmc->cqe_on = true; pr_debug("%s: cqhci: CQE on\n", mmc_hostname(mmc)); - if (cqhci_readl(cq_host, CQHCI_CTL) && CQHCI_HALT) { + if (cqhci_readl(cq_host, CQHCI_CTL) & CQHCI_HALT) { pr_err("%s: cqhci: CQE failed to exit halt state\n", mmc_hostname(mmc)); }
To check if mmc cqe is in halt state, need to check set/clear of CQHCI_HALT bit. At this time, we need to check with &, not &&. Fixes: a4080225f51d ("mmc: cqhci: support for command queue enabled host") Cc: stable@vger.kernel.org Signed-off-by: Seunghwan Baek <sh8267.baek@samsung.com> --- drivers/mmc/host/cqhci-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)