* [PATCH] mmc : fix for check cqe halt.
[not found] <CGME20240828042653epcas1p1952b6cee9484b53d86727dd0e041a0b5@epcas1p1.samsung.com>
@ 2024-08-28 4:26 ` Seunghwan Baek
2024-08-28 4:57 ` Ritesh Harjani
0 siblings, 1 reply; 3+ messages in thread
From: Seunghwan Baek @ 2024-08-28 4:26 UTC (permalink / raw)
To: linux-kernel, linux-mmc, ulf.hansson, ritesh.list, quic_asutoshd,
adrian.hunter
Cc: grant.jung, jt77.jang, junwoo80.lee, dh0421.hwang, jangsub.yi,
sh043.lee, cw9316.lee, sh8267.baek, wkon.kim, stable
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: 0653300224a6 ("mmc: cqhci: rename cqhci.c to cqhci-core.c")
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(-)
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mmc : fix for check cqe halt.
2024-08-28 4:26 ` [PATCH] mmc : fix for check cqe halt Seunghwan Baek
@ 2024-08-28 4:57 ` Ritesh Harjani
2024-08-28 6:41 ` Ritesh Harjani
0 siblings, 1 reply; 3+ messages in thread
From: Ritesh Harjani @ 2024-08-28 4:57 UTC (permalink / raw)
To: Seunghwan Baek, linux-kernel, linux-mmc, ulf.hansson,
quic_asutoshd, adrian.hunter
Cc: grant.jung, jt77.jang, junwoo80.lee, dh0421.hwang, jangsub.yi,
sh043.lee, cw9316.lee, sh8267.baek, wkon.kim, stable
Seunghwan Baek <sh8267.baek@samsung.com> writes:
> 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: 0653300224a6 ("mmc: cqhci: rename cqhci.c to cqhci-core.c")
> 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(-)
Thanks for fixing it!
Small suggestion below. But this still looks good to me, so either ways-
Reviewed-by: Ritesh Harjani <ritesh.list@gmail.com>
>
> 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) {
There is already a helper cqhci_halted(). Maybe we could use that.
static bool cqhci_halted(struct cqhci_host *cq_host)
{
return 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
-ritesh
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mmc : fix for check cqe halt.
2024-08-28 4:57 ` Ritesh Harjani
@ 2024-08-28 6:41 ` Ritesh Harjani
0 siblings, 0 replies; 3+ messages in thread
From: Ritesh Harjani @ 2024-08-28 6:41 UTC (permalink / raw)
To: Seunghwan Baek, linux-kernel, linux-mmc, ulf.hansson,
quic_asutoshd, adrian.hunter
Cc: grant.jung, jt77.jang, junwoo80.lee, dh0421.hwang, jangsub.yi,
sh043.lee, cw9316.lee, sh8267.baek, wkon.kim, stable
Ritesh Harjani <ritesh.list@gmail.com> writes:
> Seunghwan Baek <sh8267.baek@samsung.com> writes:
>
>> 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: 0653300224a6 ("mmc: cqhci: rename cqhci.c to cqhci-core.c")
Correction. This should be:
Fixes: a4080225f51d ("mmc: cqhci: support for command queue enabled host")
Subject can be:
mmc: cqhci: Fix checking of CQHCI_HALT state
>> 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(-)
>
> Thanks for fixing it!
> Small suggestion below. But this still looks good to me, so either ways-
>
> Reviewed-by: Ritesh Harjani <ritesh.list@gmail.com>
With above changes please feel free to add RVB.
-ritesh
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-08-28 6:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CGME20240828042653epcas1p1952b6cee9484b53d86727dd0e041a0b5@epcas1p1.samsung.com>
2024-08-28 4:26 ` [PATCH] mmc : fix for check cqe halt Seunghwan Baek
2024-08-28 4:57 ` Ritesh Harjani
2024-08-28 6:41 ` Ritesh Harjani
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox