ATH11K Archive mirror
 help / color / mirror / Atom feed
From: Baochen Qiang <quic_bqiang@quicinc.com>
To: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Cc: Vlastimil Babka <vbabka@suse.cz>,
	Jeff Johnson <quic_jjohnson@quicinc.com>,
	Takashi Iwai <tiwai@suse.de>, Jiri Slaby <jirislaby@kernel.org>,
	Kalle Valo <kvalo@kernel.org>,
	Linux Wireless <linux-wireless@vger.kernel.org>,
	<ath11k@lists.infradead.org>, LKML <linux-kernel@vger.kernel.org>,
	<mhi@lists.linux.dev>, <linux-arm-msm@vger.kernel.org>
Subject: Re: ath11k allocation failure on resume breaking wifi until power cycle
Date: Tue, 27 Feb 2024 16:40:19 +0800	[thread overview]
Message-ID: <719c19d4-1c1a-40e8-8375-06b5f04f885d@quicinc.com> (raw)
In-Reply-To: <20240227071915.GE2587@thinkpad>



On 2/27/2024 3:19 PM, Manivannan Sadhasivam wrote:
> On Tue, Feb 27, 2024 at 10:43:22AM +0800, Baochen Qiang wrote:
>>
>>
>> On 2/26/2024 7:43 PM, Manivannan Sadhasivam wrote:
>>> On Mon, Feb 26, 2024 at 05:11:17PM +0800, Baochen Qiang wrote:
>>>>
>>>>
>>>> On 2/26/2024 4:45 PM, Vlastimil Babka wrote:
>>>>> On 2/26/24 03:09, Baochen Qiang wrote:
>>>>>>
>>>>>>
>>>>>> On 2/23/2024 11:28 PM, Vlastimil Babka wrote:
>>>>>>> On 2/22/24 06:47, Manivannan Sadhasivam wrote:
>>>>>>>> On Wed, Feb 21, 2024 at 08:34:23AM -0800, Jeff Johnson wrote:
>>>>>>>>> On 2/21/2024 6:39 AM, Vlastimil Babka wrote:
>>>>>>>>>> Hi,
>>>>>>>>>>
>>>>>>>>>> starting with 6.8 rc series, I'm experiencing problems on resume from s2idle
>>>>>>>>>> on my laptop, which is Lenovo T14s Gen3:
>>>>>>>>>>
>>>>>>>>>> LENOVO 21CRS0K63K/21CRS0K63K, BIOS R22ET65W (1.35 )
>>>>>>>>>> ath11k_pci 0000:01:00.0: wcn6855 hw2.1
>>>>>>>>>> ath11k_pci 0000:01:00.0: chip_id 0x12 chip_family 0xb board_id 0xff soc_id 0x400c1211
>>>>>>>>>> ath11k_pci 0000:01:00.0: fw_version 0x1106196e fw_build_timestamp 2024-01-12 11:30 fw_build_id WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.37
>>>>>>>>>>
>>>>>>>>>> The problem is an allocation failure happening on resume from s2idle. After
>>>>>>>>>> that the wifi stops working and even a reboot won't fix it, only a
>>>>>>>>>> poweroff/poweron cycle of the laptop.
>>>>>>>>>>
>>>>>>>>
>>>>>>>> Looks like WLAN is powered down during s2idle, which doesn't make sense. I hope
>>>>>>>> Jeff will figure out what's going on.
>>>>>>>
>>>>>>> You mean the firmware is supposed to power it down/up transparently without
>>>>>>> kernel involvement? Because it should be powered down to save the power, no?
>>>>>> Let me clarify: from backtrace info, seems you are using a kernel with
>>>>>> the hibernation-support patches [1] applied, which are not accepted yet
>>>>>> to mainline kernel or even
>>>>>> git://git.kernel.org/pub/scm/linux/kernel/git/mani/mhi.git.
>>>>>
>>>>> Oh, you're right. Sorry for confusing you all. The rc kernel builds we have
>>>>> for openSUSE have nearly no non-upstream patches so it didn't really occur
>>>>> to me to double check if there might be in the area.
>>>>>
>>>>> Seems Takashi (Cc'd) added them indeed to make hibernation work:
>>>>> https://bugzilla.suse.com/show_bug.cgi?id=1207948#c51
>>>>>
>>>>> But then, why do they affect also s2idle, is it intentional? And why I only
>>>> Yes, it's intentional. When suspend/resume, ath11k does the same for either
>>>> a s2idle suspend or a deep one.
>>>>
>>>
>>> That's a terrible idea for usecases like Android IMO. s2idle happens very often
>>> on Android platforms (screen lock) and do you want to powerdown the WLAN device
>>> all the time?
>> I am not familiar with Android case. Is WoWLAN enabled in that case? I am
>> asking this because if WoWLAN is enabled ath11k goes another path and only
>> calls mhi_pm_suspend()/resume() instead of mhi_power_down()/up().
>>
> 
> I don't work on Android platform, no idea about WoWLAN. But I just raised a
> possible issue. Please check with the Qcom internal Android teams about this. If
> it is not going to be an issue (different code path as you said above), then
> feel free to ignore my comment.
Thanks Mani.

> 
> - Mani
> 
>>>
>>> Even though it offers power saving, I'm worried about the latency and possible
>>> teardown of the chipset. Later is only valid if the chipset undergoes complete
>>> power cycle though.
>>>
>>> - Mani
>>>
>>>>> started seeing the problems in 6.8, the patches are there since August.
>>>>>
>>>>>> So this is why you see WLAN firmware is powered down during suspend.
>>>>>>
>>>>>> [1]
>>>>>> https://patchwork.kernel.org/project/linux-wireless/cover/20231127162022.518834-1-kvalo@kernel.org/
>>>>>>
>>>>>>>
>>>>>>> But I just found out that when I build my own kernel using the distro config
>>>>>>> as base but reduced by make localmodconfig, the "mhi mhi0: Requested to
>>>>>>> power ON" and related messages don't occur anymore, so there's something
>>>>>>> weird going on.
>>>>>> Here your own kernel doesn't include the hibernation-support patches, right?
>>>>>
>>>>> Right.
>>>>>
>>>>>
>>>>>
>>>
> 


      reply	other threads:[~2024-02-27  8:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-21 14:39 ath11k allocation failure on resume breaking wifi until power cycle Vlastimil Babka
2024-02-21 16:34 ` Jeff Johnson
2024-02-22  5:47   ` Manivannan Sadhasivam
2024-02-23 15:28     ` Vlastimil Babka
2024-02-26  2:09       ` Baochen Qiang
2024-02-26  8:45         ` Vlastimil Babka
2024-02-26  8:50           ` Takashi Iwai
2024-02-26  9:11           ` Baochen Qiang
2024-02-26 11:43             ` Manivannan Sadhasivam
2024-02-27  2:43               ` Baochen Qiang
2024-02-27  7:19                 ` Manivannan Sadhasivam
2024-02-27  8:40                   ` Baochen Qiang [this message]

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=719c19d4-1c1a-40e8-8375-06b5f04f885d@quicinc.com \
    --to=quic_bqiang@quicinc.com \
    --cc=ath11k@lists.infradead.org \
    --cc=jirislaby@kernel.org \
    --cc=kvalo@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=mhi@lists.linux.dev \
    --cc=quic_jjohnson@quicinc.com \
    --cc=tiwai@suse.de \
    --cc=vbabka@suse.cz \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).