[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <95c5d498-e00c-4f51-9517-1881a9b3585d@quicinc.com>
Date: Mon, 4 Mar 2024 07:42:57 -0800
From: Jeff Johnson <quic_jjohnson@...cinc.com>
To: Baochen Qiang <quic_bqiang@...cinc.com>, <ath11k@...ts.infradead.org>,
<manivannan.sadhasivam@...aro.org>
CC: <linux-wireless@...r.kernel.org>, <linux-arm-msm@...r.kernel.org>,
<mhi@...ts.linux.dev>, <davem@...emloft.net>, <edumazet@...gle.com>,
<kuba@...nel.org>, <pabeni@...hat.com>, <netdev@...r.kernel.org>
Subject: Re: [PATCH v6 3/3] wifi: ath11k: support hibernation
On 3/3/2024 10:09 PM, Baochen Qiang wrote:
> Now that all infrastructure is in place and ath11k is fixed to handle all the
> corner cases, power down the ath11k firmware during suspend and power it back
> up during resume. This fixes the problem when using hibernation with ath11k PCI
> devices.
>
> For suspend, two conditions needs to be satisfied:
> 1. since MHI channel unprepare would be done in late suspend stage,
> ath11k needs to get all QMI-dependent things done before that stage.
> 2. and because unprepare MHI channels requires a working MHI stack,
> ath11k is not allowed to call mhi_power_down() until that finishes.
> So the original suspend callback is separated into two parts: the first part
> handles all QMI-dependent things in suspend callback; while the second part
> powers down MHI in suspend_late callback. This is valid because kernel calls
> ath11k's suspend callback before all suspend_late callbacks, making the first
> condition happy. And because MHI devices are children of ath11k device
> (ab->dev), kernel guarantees that ath11k's suspend_late callback is called
> after QRTR's suspend_late callback, this satisfies the second condition.
>
> Above analysis also applies to resume process. so the original resume
> callback is separated into two parts: the first part powers up MHI stack
> in resume_early callback, this guarantees MHI stack is working when
> QRTR tries to prepare MHI channels (kernel calls QRTR's resume_early callback
> after ath11k's resume_early callback, due to the child-father relationship);
> the second part waits for the completion of restart, which won't fail now
> since MHI channels are ready for use by QMI.
>
> Another notable change is in power down path, we tell mhi_power_down() to not
> to destroy MHI devices, making it possible for QRTR to help unprepare/prepare
> MHI channels, and finally get us rid of the probe-defer issue when resume.
>
> Also change related code due to interface changes.
>
> Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.30
>
> Tested-by: Takashi Iwai <tiwai@...e.de>
> Signed-off-by: Kalle Valo <quic_kvalo@...cinc.com>
> Signed-off-by: Baochen Qiang <quic_bqiang@...cinc.com>
As was the case in the MHI patch, this looks strange. If you are adding
Kalle's SOB just because he was a proxy for v1, please remove it. But if
Kalle provided significant modifications then you should add a
Co-developed-by: tag.
/jeff
Powered by blists - more mailing lists