(adding also mhi list) Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx> writes: > On Fri, Sep 24, 2021 at 12:07:41PM +0300, Kalle Valo wrote: >> Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx> writes: >> >> > 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