regressions.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Carl Huang <cjhuang@codeaurora.org>
To: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Cc: Kalle Valo <kvalo@codeaurora.org>,
	Loic Poulain <loic.poulain@linaro.org>,
	ath11k@lists.infradead.org,
	linux-arm-msm <linux-arm-msm@vger.kernel.org>,
	linux-wireless@vger.kernel.org, regressions@lists.linux.dev
Subject: Re: [regression] mhi: ath11k resume fails on some devices
Date: Thu, 23 Sep 2021 16:34:43 +0800	[thread overview]
Message-ID: <b7c0906041dcafb43be215bd4f55326a@codeaurora.org> (raw)
In-Reply-To: <20210916171927.GB9027@thinkpad>

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@linaro.org> 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@linaro.org> 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

  reply	other threads:[~2021-09-23  8:34 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-16  8:00 Kalle Valo
2021-09-16 10:18 ` Loic Poulain
2021-09-16 11:12   ` Manivannan Sadhasivam
     [not found]     ` <CAMZdPi94607mZorp+Zmkw3seWXak6p9Jr05CQ5hhfgKQoG8n7Q@mail.gmail.com>
2021-09-16 16:35       ` Manivannan Sadhasivam
2021-09-16 16:42         ` Kalle Valo
2021-09-16 17:19           ` Manivannan Sadhasivam
2021-09-23  8:34             ` Carl Huang [this message]
2021-09-23  8:59               ` Manivannan Sadhasivam
2021-09-23  9:26                 ` Carl Huang
2021-09-23 10:50                   ` Loic Poulain
2021-09-24  9:07                 ` Kalle Valo
2021-09-24  9:57                   ` Manivannan Sadhasivam
2021-10-07  9:55                     ` Kalle Valo
2021-10-21 10:01                       ` Manivannan Sadhasivam
2021-09-24  8:36   ` Kalle Valo
2021-09-24  9:43     ` Loic Poulain
2021-09-24 10:00       ` Manivannan Sadhasivam
2021-10-07  9:48       ` Kalle Valo
2021-10-19 12:12         ` Kalle Valo
2021-10-21 10:03           ` Manivannan Sadhasivam
2021-11-12 11:36             ` Thorsten Leemhuis
2021-11-18 17:41             ` Manivannan Sadhasivam
2021-12-01  7:34               ` Thorsten Leemhuis
2021-09-25 17:40 ` Thorsten Leemhuis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b7c0906041dcafb43be215bd4f55326a@codeaurora.org \
    --to=cjhuang@codeaurora.org \
    --cc=ath11k@lists.infradead.org \
    --cc=kvalo@codeaurora.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=loic.poulain@linaro.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=regressions@lists.linux.dev \
    --subject='Re: [regression] mhi: ath11k resume fails on some devices' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).