From: Jeff Johnson <quic_jjohnson@quicinc.com>
To: Baochen Qiang <quic_bqiang@quicinc.com>, <ath11k@lists.infradead.org>
Cc: <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH 5/5] wifi: ath11k: thermal: don't try to register multiple times
Date: Wed, 21 Feb 2024 09:15:32 -0800 [thread overview]
Message-ID: <df08dfd4-189c-407b-8a2e-6fd2bbf3b22f@quicinc.com> (raw)
In-Reply-To: <20240221024725.10057-6-quic_bqiang@quicinc.com>
On 2/20/2024 6:47 PM, Baochen Qiang wrote:
> From: Kalle Valo <quic_kvalo@quicinc.com>
>
> Every time the firmware boots we call ath11k_core_qmi_firmware_ready() which
> ends up calling ath11k_thermal_register(). So we try to register thermal
> devices multiple times. And when we power off the firmware during
> suspend/hibernation (implemented in the next patch) we get a warning in resume:
>
> hwmon hwmon4: PM: parent phy0 should not be sleeping
>
> Workaround this similarly like ath11k_mac_register() does by testing
> ATH11K_FLAG_REGISTERED.
>
> Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.30
>
> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
you need to add your own S-O-B
> ---
> drivers/net/wireless/ath/ath11k/thermal.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/ath/ath11k/thermal.c b/drivers/net/wireless/ath/ath11k/thermal.c
> index c29b11ab5bfa..41e7499f075f 100644
> --- a/drivers/net/wireless/ath/ath11k/thermal.c
> +++ b/drivers/net/wireless/ath/ath11k/thermal.c
> @@ -1,7 +1,7 @@
> // SPDX-License-Identifier: BSD-3-Clause-Clear
> /*
> * Copyright (c) 2020 The Linux Foundation. All rights reserved.
> - * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
> + * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
> */
>
> #include <linux/device.h>
> @@ -163,6 +163,9 @@ int ath11k_thermal_register(struct ath11k_base *ab)
> struct ath11k_pdev *pdev;
> int i, ret;
>
> + if (test_bit(ATH11K_FLAG_REGISTERED, &ab->dev_flags))
> + return 0;
> +
> for (i = 0; i < ab->num_radios; i++) {
> pdev = &ab->pdevs[i];
> ar = pdev->ar;
next prev parent reply other threads:[~2024-02-21 17:15 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-21 2:47 [PATCH 0/5] wifi: ath11k: prepare for hibernation support Baochen Qiang
2024-02-21 2:47 ` [PATCH 1/5] wifi: ath11k: rearrange IRQ enable/disable in reset path Baochen Qiang
2024-02-21 17:13 ` Jeff Johnson
2024-02-23 15:52 ` Kalle Valo
2024-02-21 2:47 ` [PATCH 2/5] wifi: ath11k: remove MHI LOOPBACK channels Baochen Qiang
2024-02-21 17:14 ` Jeff Johnson
2024-02-21 2:47 ` [PATCH 3/5] wifi: ath11k: do not dump SRNG statistics during resume Baochen Qiang
2024-02-21 17:14 ` Jeff Johnson
2024-02-21 2:47 ` [PATCH 4/5] wifi: ath11k: fix warning on DMA ring capabilities event Baochen Qiang
2024-02-21 17:14 ` Jeff Johnson
2024-02-21 2:47 ` [PATCH 5/5] wifi: ath11k: thermal: don't try to register multiple times Baochen Qiang
2024-02-21 17:15 ` Jeff Johnson [this message]
2024-02-22 2:34 ` Baochen Qiang
2024-02-22 6:25 ` Kalle Valo
2024-02-22 7:43 ` Baochen Qiang
2024-02-22 14:58 ` Kalle Valo
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=df08dfd4-189c-407b-8a2e-6fd2bbf3b22f@quicinc.com \
--to=quic_jjohnson@quicinc.com \
--cc=ath11k@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--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).