Thread (2 messages) 2 messages, 2 authors, 2021-10-21

Re: [regression] mhi: ath11k resume fails on some devices

From: Kalle Valo <hidden>
Date: 2021-10-07 09:56:02
Also in: ath11k, linux-arm-msm, regressions

Possibly related (same subject, not in this thread)

(adding also mhi list)

Manivannan Sadhasivam [off-list ref] writes:
On Fri, Sep 24, 2021 at 12:07:41PM +0300, Kalle Valo wrote:
quoted
Manivannan Sadhasivam [off-list ref] writes:
quoted
For aid debugging, please see the state the device is in during mhi_pm_resume().
You can use below diff:
diff --git a/drivers/bus/mhi/core/pm.c b/drivers/bus/mhi/core/pm.c
index fb99e3727155..482d55dd209e 100644
--- a/drivers/bus/mhi/core/pm.c
+++ b/drivers/bus/mhi/core/pm.c
@@ -898,6 +898,9 @@ int mhi_pm_resume(struct mhi_controller *mhi_cntrl)
        if (MHI_PM_IN_ERROR_STATE(mhi_cntrl->pm_state))
                return -EIO;
 
+       dev_info(dev, "Device state: %s\n",
+                TO_MHI_STATE_STR(mhi_get_mhi_state(mhi_cntrl)));
+
        if (mhi_get_mhi_state(mhi_cntrl) != MHI_STATE_M3)
                return -EINVAL;
This is what I get with my NUC testbox:

[  970.488202] ACPI: EC: event unblocked
[  970.492484] hpet: Lost 1587 RTC interrupts
[  970.492749] mhi mhi0: Device state: RESET
Looks like the MHI device went into RESET state! It also looks to be a
firmware thing. But let's nail this down before adding any workaround in
the MHI stack.

Can you also rebuild the kernel with MHI debug enabled and capture the
logs in faliure case?
So what I should exactly do to enable debug messages?

I have this in my Kconfig:

CONFIG_MHI_BUS=m
# CONFIG_MHI_BUS_DEBUG is not set
# CONFIG_MHI_BUS_PCI_GENERIC is not set

And AFAICS CONFIG_MHI_BUS_DEBUG only enables the debugfs interface, I
doubt you meant that.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help