* [PATCH v2] bus: mhi: host: Skip MHI reset if device is in RDDM
@ 2023-05-11 2:33 Qiang Yu
2023-05-11 13:52 ` Jeffrey Hugo
0 siblings, 1 reply; 2+ messages in thread
From: Qiang Yu @ 2023-05-11 2:33 UTC (permalink / raw)
To: mani, quic_jhugo
Cc: mhi, linux-arm-msm, linux-kernel, quic_cang, quic_mrana, Qiang Yu
In RDDM EE, device can not process MHI reset issued by host. In case of MHI
power off, host is issuing MHI reset and polls for it to get cleared until
it times out. Since this timeout can not be avoided in case of RDDM, skip
the MHI reset in this scenarios.
Fixes: a0f5a630668c ("bus: mhi: Move host MHI code to "host" directory")
Signed-off-by: Qiang Yu <quic_qianyu@quicinc.com>
---
v1->v2: use ~75 columns in commit text, add Fixes tag
drivers/bus/mhi/host/pm.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/bus/mhi/host/pm.c b/drivers/bus/mhi/host/pm.c
index 0834590..8a4362d 100644
--- a/drivers/bus/mhi/host/pm.c
+++ b/drivers/bus/mhi/host/pm.c
@@ -470,6 +470,10 @@ static void mhi_pm_disable_transition(struct mhi_controller *mhi_cntrl)
/* Trigger MHI RESET so that the device will not access host memory */
if (!MHI_PM_IN_FATAL_STATE(mhi_cntrl->pm_state)) {
+ /* Skip MHI RESET if in RDDM state */
+ if (mhi_cntrl->rddm_image && mhi_get_exec_env(mhi_cntrl) == MHI_EE_RDDM)
+ goto skip_mhi_reset;
+
dev_dbg(dev, "Triggering MHI Reset in device\n");
mhi_set_mhi_state(mhi_cntrl, MHI_STATE_RESET);
@@ -495,6 +499,7 @@ static void mhi_pm_disable_transition(struct mhi_controller *mhi_cntrl)
}
}
+skip_mhi_reset:
dev_dbg(dev,
"Waiting for all pending event ring processing to complete\n");
mhi_event = mhi_cntrl->mhi_event;
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] bus: mhi: host: Skip MHI reset if device is in RDDM
2023-05-11 2:33 [PATCH v2] bus: mhi: host: Skip MHI reset if device is in RDDM Qiang Yu
@ 2023-05-11 13:52 ` Jeffrey Hugo
0 siblings, 0 replies; 2+ messages in thread
From: Jeffrey Hugo @ 2023-05-11 13:52 UTC (permalink / raw)
To: Qiang Yu, mani; +Cc: mhi, linux-arm-msm, linux-kernel, quic_cang, quic_mrana
On 5/10/2023 8:33 PM, Qiang Yu wrote:
> In RDDM EE, device can not process MHI reset issued by host. In case of MHI
> power off, host is issuing MHI reset and polls for it to get cleared until
> it times out. Since this timeout can not be avoided in case of RDDM, skip
> the MHI reset in this scenarios.
>
> Fixes: a0f5a630668c ("bus: mhi: Move host MHI code to "host" directory")
This doesn't seem like the correct fixes tag. That commit looks like it
just moves code around, but does not add code. What is the commit that
added the relevant code? That commit probably predates the move.
> Signed-off-by: Qiang Yu <quic_qianyu@quicinc.com>
> ---
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-05-11 13:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-11 2:33 [PATCH v2] bus: mhi: host: Skip MHI reset if device is in RDDM Qiang Yu
2023-05-11 13:52 ` Jeffrey Hugo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).