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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2021-09-17 01:19, Manivannan Sadhasivam wrote:
On Thu, Sep 16, 2021 at 07:42:02PM +0300, Kalle Valo wrote:
Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx> writes:

> On Thu, Sep 16, 2021 at 01:18:22PM +0200, Loic Poulain wrote:
>> Le jeu. 16 sept. 2021 à 13:12, Manivannan Sadhasivam <
>> manivannan.sadhasivam@xxxxxxxxxx> a écrit :
>>
>
> [...]
>
>> > If things seems to work fine without that patch, then it implies that
>> > setting M0
>> > state works during resume. I think we should just revert that patch.
>> >
>> > Loic, did that patch fix any issue for you or it was a cosmetic fix only?
>>
>>
>> It fixes sdx modem resuming issue, without that we don’t know modem needs
>> to be reinitialized.
>>
>
> Okay. Then in that case, the recovery mechanism has to be added to the ath11k
> MHI controller.

What does that mean in practise, do you have any pointers or examples? I
have no clue what you are proposing :)


Take a look at the mhi_pci_recovery_work() function below:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/bus/mhi/pci_generic.c#n610

You need to implement something similar that basically powers up the MHI endpoint (QCA6390) in case pm_resume() fails. At minimum, you need to call
below functions:

# Check if the device is powered on. If yes, then power it down to bring it back
mhi_power_down()
mhi_unprepare_after_power_down()

# Power up the device
mhi_prepare_for_power_up()
mhi_sync_power_up()

This implies that the WLAN device has been powered off during suspend, so the
resume fails and we are bringing the device back to working state.

This is fine for platform which doesn't provide power supply during suspend.
But NUC has power supply in suspend state.
QCA6390 on NUC works after just reverting this commit also proves NUC has power supply in
suspend state.

The reason is MHI-STATUS register can't be read somehow in M3 state on NUC. Does the MHI spec state that MHI-STATUS register can be read in M3 state?

> If that's too much of work for Kalle, then I'll look into it. But I might get
> time only after Plumbers.

I'm busy, as always, so not sure when I'm able to do it either. I think
we should seriously consider reverting 020d3b26c07a and adding it back
after ath11k is able to handle this new situation.


Since Loic said that reverting would cause his modem (SDX device) to fail during
resume, this is not possible.

Thanks,
Mani

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

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux