* [PATCH 0/5] wifi: ath11k: prepare for hibernation support
@ 2024-02-21 2:47 Baochen Qiang
2024-02-21 2:47 ` [PATCH 1/5] wifi: ath11k: rearrange IRQ enable/disable in reset path Baochen Qiang
` (4 more replies)
0 siblings, 5 replies; 16+ messages in thread
From: Baochen Qiang @ 2024-02-21 2:47 UTC (permalink / raw)
To: ath11k; +Cc: linux-wireless, quic_bqiang
This is to do some prepare work for hibernation, the final hibernation
support comes in a following patch set.
Baochen Qiang (4):
wifi: ath11k: rearrange IRQ enable/disable in reset path
wifi: ath11k: remove MHI LOOPBACK channels
wifi: ath11k: do not dump SRNG statistics during resume
wifi: ath11k: fix warning on DMA ring capabilities event
Kalle Valo (1):
wifi: ath11k: thermal: don't try to register multiple times
drivers/net/wireless/ath/ath11k/core.c | 8 ++--
drivers/net/wireless/ath/ath11k/mhi.c | 56 -----------------------
drivers/net/wireless/ath/ath11k/qmi.c | 5 +-
drivers/net/wireless/ath/ath11k/thermal.c | 5 +-
drivers/net/wireless/ath/ath11k/wmi.c | 3 +-
5 files changed, 14 insertions(+), 63 deletions(-)
base-commit: 707e306f3573fa321ae197d77366578e4566cff5
--
2.25.1
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 1/5] wifi: ath11k: rearrange IRQ enable/disable in reset path
2024-02-21 2:47 [PATCH 0/5] wifi: ath11k: prepare for hibernation support Baochen Qiang
@ 2024-02-21 2:47 ` 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
` (3 subsequent siblings)
4 siblings, 2 replies; 16+ messages in thread
From: Baochen Qiang @ 2024-02-21 2:47 UTC (permalink / raw)
To: ath11k; +Cc: linux-wireless, quic_bqiang
For non WoW suspend/resume, ath11k host powers down whole hardware
when suspend and powers up it when resume, the code path it goes
through is very like the ath11k reset logic.
In order to reuse that logic, rearrange IRQ handling in the reset
path.
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>
Signed-off-by: Baochen Qiang <quic_bqiang@quicinc.com>
---
drivers/net/wireless/ath/ath11k/core.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/ath/ath11k/core.c b/drivers/net/wireless/ath/ath11k/core.c
index 922e67f8e04f..c78bce19bd75 100644
--- a/drivers/net/wireless/ath/ath11k/core.c
+++ b/drivers/net/wireless/ath/ath11k/core.c
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: BSD-3-Clause-Clear
/*
* Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
*/
#include <linux/module.h>
@@ -1869,10 +1869,9 @@ static int ath11k_core_reconfigure_on_crash(struct ath11k_base *ab)
mutex_lock(&ab->core_lock);
ath11k_thermal_unregister(ab);
- ath11k_hif_irq_disable(ab);
ath11k_dp_pdev_free(ab);
ath11k_spectral_deinit(ab);
- ath11k_hif_stop(ab);
+ ath11k_ce_cleanup_pipes(ab);
ath11k_wmi_detach(ab);
ath11k_dp_pdev_reo_cleanup(ab);
mutex_unlock(&ab->core_lock);
@@ -2127,6 +2126,9 @@ static void ath11k_core_reset(struct work_struct *work)
time_left = wait_for_completion_timeout(&ab->recovery_start,
ATH11K_RECOVER_START_TIMEOUT_HZ);
+ ath11k_hif_irq_disable(ab);
+ ath11k_hif_ce_irq_disable(ab);
+
ath11k_hif_power_down(ab);
ath11k_hif_power_up(ab);
--
2.25.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 2/5] wifi: ath11k: remove MHI LOOPBACK channels
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 2:47 ` 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
` (2 subsequent siblings)
4 siblings, 1 reply; 16+ messages in thread
From: Baochen Qiang @ 2024-02-21 2:47 UTC (permalink / raw)
To: ath11k; +Cc: linux-wireless, quic_bqiang
There is no driver to match these two channels, so
remove them. This fixes warnings from MHI subsystem during suspend:
mhi mhi0_LOOPBACK: 1: Failed to reset channel, still resetting
mhi mhi0_LOOPBACK: 0: Failed to reset channel, still resetting
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>
Signed-off-by: Baochen Qiang <quic_bqiang@quicinc.com>
---
drivers/net/wireless/ath/ath11k/mhi.c | 56 ---------------------------
1 file changed, 56 deletions(-)
diff --git a/drivers/net/wireless/ath/ath11k/mhi.c b/drivers/net/wireless/ath/ath11k/mhi.c
index b53659145fcf..3de7fa6f88d0 100644
--- a/drivers/net/wireless/ath/ath11k/mhi.c
+++ b/drivers/net/wireless/ath/ath11k/mhi.c
@@ -21,34 +21,6 @@
#define RDDM_DUMP_SIZE 0x420000
static struct mhi_channel_config ath11k_mhi_channels_qca6390[] = {
- {
- .num = 0,
- .name = "LOOPBACK",
- .num_elements = 32,
- .event_ring = 0,
- .dir = DMA_TO_DEVICE,
- .ee_mask = 0x4,
- .pollcfg = 0,
- .doorbell = MHI_DB_BRST_DISABLE,
- .lpm_notify = false,
- .offload_channel = false,
- .doorbell_mode_switch = false,
- .auto_queue = false,
- },
- {
- .num = 1,
- .name = "LOOPBACK",
- .num_elements = 32,
- .event_ring = 0,
- .dir = DMA_FROM_DEVICE,
- .ee_mask = 0x4,
- .pollcfg = 0,
- .doorbell = MHI_DB_BRST_DISABLE,
- .lpm_notify = false,
- .offload_channel = false,
- .doorbell_mode_switch = false,
- .auto_queue = false,
- },
{
.num = 20,
.name = "IPCR",
@@ -114,34 +86,6 @@ static struct mhi_controller_config ath11k_mhi_config_qca6390 = {
};
static struct mhi_channel_config ath11k_mhi_channels_qcn9074[] = {
- {
- .num = 0,
- .name = "LOOPBACK",
- .num_elements = 32,
- .event_ring = 1,
- .dir = DMA_TO_DEVICE,
- .ee_mask = 0x14,
- .pollcfg = 0,
- .doorbell = MHI_DB_BRST_DISABLE,
- .lpm_notify = false,
- .offload_channel = false,
- .doorbell_mode_switch = false,
- .auto_queue = false,
- },
- {
- .num = 1,
- .name = "LOOPBACK",
- .num_elements = 32,
- .event_ring = 1,
- .dir = DMA_FROM_DEVICE,
- .ee_mask = 0x14,
- .pollcfg = 0,
- .doorbell = MHI_DB_BRST_DISABLE,
- .lpm_notify = false,
- .offload_channel = false,
- .doorbell_mode_switch = false,
- .auto_queue = false,
- },
{
.num = 20,
.name = "IPCR",
--
2.25.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 3/5] wifi: ath11k: do not dump SRNG statistics during resume
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 2:47 ` [PATCH 2/5] wifi: ath11k: remove MHI LOOPBACK channels Baochen Qiang
@ 2024-02-21 2:47 ` 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 2:47 ` [PATCH 5/5] wifi: ath11k: thermal: don't try to register multiple times Baochen Qiang
4 siblings, 1 reply; 16+ messages in thread
From: Baochen Qiang @ 2024-02-21 2:47 UTC (permalink / raw)
To: ath11k; +Cc: linux-wireless, quic_bqiang
Both the firmware reset feature and the power management
suspend/resume feature share common power-down and power-up
functionality. One aspect of the power-up functionality is
the handling of the ATH11K_QMI_EVENT_FW_INIT_DONE event.
When this event is received, a call is made to
ath11k_hal_dump_srng_stats(), with the purpose to collect
information that may be useful in debugging the cause of a
firmware reset.
Unfortunately, since this functionality is shared between
both the firmware reset path and the power management
resume path, the kernel log is flooded with messages during
resume. Since these messages are not useful during resume,
and in fact can be confusing and can increase the time it
takes to resume, update the logic to only call
ath11k_hal_dump_srng_stats() during firmware reset.
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>
Signed-off-by: Baochen Qiang <quic_bqiang@quicinc.com>
---
drivers/net/wireless/ath/ath11k/qmi.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ath/ath11k/qmi.c b/drivers/net/wireless/ath/ath11k/qmi.c
index 2c7cab62b9bb..5006f81f779b 100644
--- a/drivers/net/wireless/ath/ath11k/qmi.c
+++ b/drivers/net/wireless/ath/ath11k/qmi.c
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: BSD-3-Clause-Clear
/*
* Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
*/
#include <linux/elf.h>
@@ -3249,7 +3249,8 @@ static void ath11k_qmi_driver_event_work(struct work_struct *work)
case ATH11K_QMI_EVENT_FW_INIT_DONE:
clear_bit(ATH11K_FLAG_QMI_FAIL, &ab->dev_flags);
if (test_bit(ATH11K_FLAG_REGISTERED, &ab->dev_flags)) {
- ath11k_hal_dump_srng_stats(ab);
+ if (ab->is_reset)
+ ath11k_hal_dump_srng_stats(ab);
queue_work(ab->workqueue, &ab->restart_work);
break;
}
--
2.25.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 4/5] wifi: ath11k: fix warning on DMA ring capabilities event
2024-02-21 2:47 [PATCH 0/5] wifi: ath11k: prepare for hibernation support Baochen Qiang
` (2 preceding siblings ...)
2024-02-21 2:47 ` [PATCH 3/5] wifi: ath11k: do not dump SRNG statistics during resume Baochen Qiang
@ 2024-02-21 2:47 ` 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
4 siblings, 1 reply; 16+ messages in thread
From: Baochen Qiang @ 2024-02-21 2:47 UTC (permalink / raw)
To: ath11k; +Cc: linux-wireless, quic_bqiang
We are seeing below warning in both reset and suspend/resume scenarios:
[69663.691847] ath11k_pci 0000:02:00.0: Already processed, so ignoring dma ring caps
This is because ab->num_db_cap is not cleared in
ath11k_wmi_free_dbring_caps(), so clear it to avoid such
warnings.
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>
Signed-off-by: Baochen Qiang <quic_bqiang@quicinc.com>
---
drivers/net/wireless/ath/ath11k/wmi.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath11k/wmi.c b/drivers/net/wireless/ath/ath11k/wmi.c
index b2911d6f9551..75fae1e01130 100644
--- a/drivers/net/wireless/ath/ath11k/wmi.c
+++ b/drivers/net/wireless/ath/ath11k/wmi.c
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: BSD-3-Clause-Clear
/*
* Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
*/
#include <linux/skbuff.h>
#include <linux/ctype.h>
@@ -4858,6 +4858,7 @@ static void ath11k_wmi_free_dbring_caps(struct ath11k_base *ab)
{
kfree(ab->db_caps);
ab->db_caps = NULL;
+ ab->num_db_cap = 0;
}
static int ath11k_wmi_tlv_dma_ring_caps(struct ath11k_base *ab,
--
2.25.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 5/5] wifi: ath11k: thermal: don't try to register multiple times
2024-02-21 2:47 [PATCH 0/5] wifi: ath11k: prepare for hibernation support Baochen Qiang
` (3 preceding siblings ...)
2024-02-21 2:47 ` [PATCH 4/5] wifi: ath11k: fix warning on DMA ring capabilities event Baochen Qiang
@ 2024-02-21 2:47 ` Baochen Qiang
2024-02-21 17:15 ` Jeff Johnson
4 siblings, 1 reply; 16+ messages in thread
From: Baochen Qiang @ 2024-02-21 2:47 UTC (permalink / raw)
To: ath11k; +Cc: linux-wireless, quic_bqiang
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>
---
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;
--
2.25.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH 1/5] wifi: ath11k: rearrange IRQ enable/disable in reset path
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
1 sibling, 0 replies; 16+ messages in thread
From: Jeff Johnson @ 2024-02-21 17:13 UTC (permalink / raw)
To: Baochen Qiang, ath11k; +Cc: linux-wireless
On 2/20/2024 6:47 PM, Baochen Qiang wrote:
> For non WoW suspend/resume, ath11k host powers down whole hardware
> when suspend and powers up it when resume, the code path it goes
> through is very like the ath11k reset logic.
>
> In order to reuse that logic, rearrange IRQ handling in the reset
> path.
>
> 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>
> Signed-off-by: Baochen Qiang <quic_bqiang@quicinc.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 2/5] wifi: ath11k: remove MHI LOOPBACK channels
2024-02-21 2:47 ` [PATCH 2/5] wifi: ath11k: remove MHI LOOPBACK channels Baochen Qiang
@ 2024-02-21 17:14 ` Jeff Johnson
0 siblings, 0 replies; 16+ messages in thread
From: Jeff Johnson @ 2024-02-21 17:14 UTC (permalink / raw)
To: Baochen Qiang, ath11k; +Cc: linux-wireless
On 2/20/2024 6:47 PM, Baochen Qiang wrote:
> There is no driver to match these two channels, so
> remove them. This fixes warnings from MHI subsystem during suspend:
>
> mhi mhi0_LOOPBACK: 1: Failed to reset channel, still resetting
> mhi mhi0_LOOPBACK: 0: Failed to reset channel, still resetting
>
> 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>
> Signed-off-by: Baochen Qiang <quic_bqiang@quicinc.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 3/5] wifi: ath11k: do not dump SRNG statistics during resume
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
0 siblings, 0 replies; 16+ messages in thread
From: Jeff Johnson @ 2024-02-21 17:14 UTC (permalink / raw)
To: Baochen Qiang, ath11k; +Cc: linux-wireless
On 2/20/2024 6:47 PM, Baochen Qiang wrote:
> Both the firmware reset feature and the power management
> suspend/resume feature share common power-down and power-up
> functionality. One aspect of the power-up functionality is
> the handling of the ATH11K_QMI_EVENT_FW_INIT_DONE event.
> When this event is received, a call is made to
> ath11k_hal_dump_srng_stats(), with the purpose to collect
> information that may be useful in debugging the cause of a
> firmware reset.
>
> Unfortunately, since this functionality is shared between
> both the firmware reset path and the power management
> resume path, the kernel log is flooded with messages during
> resume. Since these messages are not useful during resume,
> and in fact can be confusing and can increase the time it
> takes to resume, update the logic to only call
> ath11k_hal_dump_srng_stats() during firmware reset.
>
> 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>
> Signed-off-by: Baochen Qiang <quic_bqiang@quicinc.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 4/5] wifi: ath11k: fix warning on DMA ring capabilities event
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
0 siblings, 0 replies; 16+ messages in thread
From: Jeff Johnson @ 2024-02-21 17:14 UTC (permalink / raw)
To: Baochen Qiang, ath11k; +Cc: linux-wireless
On 2/20/2024 6:47 PM, Baochen Qiang wrote:
> We are seeing below warning in both reset and suspend/resume scenarios:
>
> [69663.691847] ath11k_pci 0000:02:00.0: Already processed, so ignoring dma ring caps
>
> This is because ab->num_db_cap is not cleared in
> ath11k_wmi_free_dbring_caps(), so clear it to avoid such
> warnings.
>
> 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>
> Signed-off-by: Baochen Qiang <quic_bqiang@quicinc.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 5/5] wifi: ath11k: thermal: don't try to register multiple times
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
2024-02-22 2:34 ` Baochen Qiang
0 siblings, 1 reply; 16+ messages in thread
From: Jeff Johnson @ 2024-02-21 17:15 UTC (permalink / raw)
To: Baochen Qiang, ath11k; +Cc: linux-wireless
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;
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 5/5] wifi: ath11k: thermal: don't try to register multiple times
2024-02-21 17:15 ` Jeff Johnson
@ 2024-02-22 2:34 ` Baochen Qiang
2024-02-22 6:25 ` Kalle Valo
0 siblings, 1 reply; 16+ messages in thread
From: Baochen Qiang @ 2024-02-22 2:34 UTC (permalink / raw)
To: Jeff Johnson, ath11k, Kalle Valo (QUIC); +Cc: linux-wireless
On 2/22/2024 1:15 AM, Jeff Johnson wrote:
> 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
Oh, sorry for missing that.
Hi Kalle, I see you have put this series in pending branch. I am
wondering if I need to send a v2 to add my S-O-B tag, or you have any
other plan?
>
>> ---
>> 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;
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 5/5] wifi: ath11k: thermal: don't try to register multiple times
2024-02-22 2:34 ` Baochen Qiang
@ 2024-02-22 6:25 ` Kalle Valo
2024-02-22 7:43 ` Baochen Qiang
0 siblings, 1 reply; 16+ messages in thread
From: Kalle Valo @ 2024-02-22 6:25 UTC (permalink / raw)
To: Baochen Qiang; +Cc: Jeff Johnson, ath11k, linux-wireless
Baochen Qiang <quic_bqiang@quicinc.com> writes:
> On 2/22/2024 1:15 AM, Jeff Johnson wrote:
>> 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
> Oh, sorry for missing that.
>
> Hi Kalle, I see you have put this series in pending branch. I am
> wondering if I need to send a v2 to add my S-O-B tag, or you have any
> other plan?
I can add it in the pending branch if you send it to me as a reply to
this mail. s-o-b is like a signature so I won't add it on my own.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 5/5] wifi: ath11k: thermal: don't try to register multiple times
2024-02-22 6:25 ` Kalle Valo
@ 2024-02-22 7:43 ` Baochen Qiang
2024-02-22 14:58 ` Kalle Valo
0 siblings, 1 reply; 16+ messages in thread
From: Baochen Qiang @ 2024-02-22 7:43 UTC (permalink / raw)
To: Kalle Valo; +Cc: Jeff Johnson, ath11k, linux-wireless
On 2/22/2024 2:25 PM, Kalle Valo wrote:
> Baochen Qiang <quic_bqiang@quicinc.com> writes:
>
>> On 2/22/2024 1:15 AM, Jeff Johnson wrote:
>>> 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
>> Oh, sorry for missing that.
>>
>> Hi Kalle, I see you have put this series in pending branch. I am
>> wondering if I need to send a v2 to add my S-O-B tag, or you have any
>> other plan?
>
> I can add it in the pending branch if you send it to me as a reply to
> this mail. s-o-b is like a signature so I won't add it on my own.
Understood Kalle. So please help add below tag to this patch in pending
branch:
Signed-off-by: Baochen Qiang <quic_bqiang@quicinc.com>
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 5/5] wifi: ath11k: thermal: don't try to register multiple times
2024-02-22 7:43 ` Baochen Qiang
@ 2024-02-22 14:58 ` Kalle Valo
0 siblings, 0 replies; 16+ messages in thread
From: Kalle Valo @ 2024-02-22 14:58 UTC (permalink / raw)
To: Baochen Qiang; +Cc: Jeff Johnson, ath11k, linux-wireless
Baochen Qiang <quic_bqiang@quicinc.com> writes:
> On 2/22/2024 2:25 PM, Kalle Valo wrote:
>> Baochen Qiang <quic_bqiang@quicinc.com> writes:
>>
>>> On 2/22/2024 1:15 AM, Jeff Johnson wrote:
>>>> 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
>>> Oh, sorry for missing that.
>>>
>>> Hi Kalle, I see you have put this series in pending branch. I am
>>> wondering if I need to send a v2 to add my S-O-B tag, or you have any
>>> other plan?
>> I can add it in the pending branch if you send it to me as a reply
>> to
>> this mail. s-o-b is like a signature so I won't add it on my own.
> Understood Kalle. So please help add below tag to this patch in
> pending branch:
> Signed-off-by: Baochen Qiang <quic_bqiang@quicinc.com>
Thanks, added:
https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?h=pending&id=a88f2007763465f2be307c3a5ed542233bc3c77e
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 1/5] wifi: ath11k: rearrange IRQ enable/disable in reset path
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
1 sibling, 0 replies; 16+ messages in thread
From: Kalle Valo @ 2024-02-23 15:52 UTC (permalink / raw)
To: Baochen Qiang; +Cc: ath11k, linux-wireless, quic_bqiang
Baochen Qiang <quic_bqiang@quicinc.com> wrote:
> For non WoW suspend/resume, ath11k host powers down whole hardware
> when suspend and powers up it when resume, the code path it goes
> through is very like the ath11k reset logic.
>
> In order to reuse that logic, rearrange IRQ handling in the reset
> path.
>
> 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>
> Signed-off-by: Baochen Qiang <quic_bqiang@quicinc.com>
5 patches applied to ath-next branch of ath.git, thanks.
d455e805de70 wifi: ath11k: rearrange IRQ enable/disable in reset path
fbb2a14afe00 wifi: ath11k: remove MHI LOOPBACK channels
5f3288a34878 wifi: ath11k: do not dump SRNG statistics during resume
361c90ed3647 wifi: ath11k: fix warning on DMA ring capabilities event
50556081e09b wifi: ath11k: thermal: don't try to register multiple times
--
https://patchwork.kernel.org/project/linux-wireless/patch/20240221024725.10057-2-quic_bqiang@quicinc.com/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2024-02-23 15:52 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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
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).