netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@kernel.org>
To: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Cc: Baochen Qiang <quic_bqiang@quicinc.com>,
	 ath11k@lists.infradead.org, linux-wireless@vger.kernel.org,
	 linux-arm-msm@vger.kernel.org, mhi@lists.linux.dev,
	 davem@davemloft.net,  edumazet@google.com, kuba@kernel.org,
	 pabeni@redhat.com,  netdev@vger.kernel.org
Subject: Re: [PATCH v7 1/3] bus: mhi: host: add mhi_power_down_keep_dev()
Date: Fri, 05 Apr 2024 15:30:03 +0300	[thread overview]
Message-ID: <87wmpc2dro.fsf@kernel.org> (raw)
In-Reply-To: <20240401104908.GA234427@thinkpad> (Manivannan Sadhasivam's message of "Mon, 1 Apr 2024 16:19:08 +0530")

Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> writes:

> On Tue, Mar 05, 2024 at 10:13:18AM +0800, Baochen Qiang wrote:
>
>> ath11k fails to resume:
>> 
>> ath11k_pci 0000:06:00.0: timeout while waiting for restart complete
>> 
>> This happens because when calling mhi_sync_power_up() the MHI subsystem
>> eventually calls device_add() from mhi_create_devices() but the device
>> creation is deferred:
>> 
>> mhi mhi0_IPCR: Driver qcom_mhi_qrtr force probe deferral
>> 
>> The reason for deferring device creation is explained in dpm_prepare():
>> 
>>         /*
>>          * It is unsafe if probing of devices will happen during suspend or
>>          * hibernation and system behavior will be unpredictable in this case.
>>          * So, let's prohibit device's probing here and defer their probes
>>          * instead. The normal behavior will be restored in dpm_complete().
>>          */
>> 
>> Because the device probe is deferred, the qcom_mhi_qrtr_probe() is not
>> called and thus MHI channels are not prepared:
>> 
>> So what this means that QRTR is not delivering messages and the QMI connection
>> is not working between ath11k and the firmware, resulting a failure in firmware
>> initialization.
>> 
>> To fix this add new function mhi_power_down_keep_dev() which doesn't destroy
>> the devices for channels during power down. This way we avoid probe defer issue
>> and finally can get ath11k hibernation working with the following patches.
>> 
>> Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.30
>> 
>> Signed-off-by: Baochen Qiang <quic_bqiang@quicinc.com>
>
> Applied to mhi-next! Note that this patch is also available in mhi-immutable
> branch for ath11k maintainers to pull into their tree.
>
> https://git.kernel.org/pub/scm/linux/kernel/git/mani/mhi.git/log/?h=mhi-immutable

Thanks, I pulled this branch to ath-next:

https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?h=ath-next&id=231a4c893c9bb2984a8c6b7450199f59eb816ed9

This is just preparation for patches 2 and 3, those patches are not
commited yet.

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

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

  reply	other threads:[~2024-04-05 12:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-05  2:13 [PATCH v7 0/3] wifi: ath11k: hibernation support Baochen Qiang
2024-03-05  2:13 ` [PATCH v7 1/3] bus: mhi: host: add mhi_power_down_keep_dev() Baochen Qiang
2024-04-01 10:49   ` Manivannan Sadhasivam
2024-04-05 12:30     ` Kalle Valo [this message]
2024-03-05  2:13 ` [PATCH v7 2/3] net: qrtr: support suspend/hibernation Baochen Qiang
2024-04-05 13:27   ` Kalle Valo
2024-04-09  9:29     ` Kalle Valo
2024-04-09 21:36       ` Jakub Kicinski
2024-04-09 11:43   ` Kalle Valo
2024-03-05  2:13 ` [PATCH v7 3/3] wifi: ath11k: support hibernation Baochen Qiang
2024-03-05  2:46   ` Jeff Johnson

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=87wmpc2dro.fsf@kernel.org \
    --to=kvalo@kernel.org \
    --cc=ath11k@lists.infradead.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=mhi@lists.linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=quic_bqiang@quicinc.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).