From 618d7233b11db2d98e010dfeb65bf66312b0439b Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Feb 26 2024 13:02:22 +0000 Subject: wifi: ath11k: rearrange IRQ enable/disable in reset path (bsc#1207948). --- diff --git a/patches.suse/wifi-ath11k-rearrange-IRQ-enable-disable-in-reset-pa.patch b/patches.suse/wifi-ath11k-rearrange-IRQ-enable-disable-in-reset-pa.patch new file mode 100644 index 0000000..168007a --- /dev/null +++ b/patches.suse/wifi-ath11k-rearrange-IRQ-enable-disable-in-reset-pa.patch @@ -0,0 +1,65 @@ +From d455e805de706e8c1ce945a0202028c8d764b9bc Mon Sep 17 00:00:00 2001 +From: Baochen Qiang +Date: Fri, 23 Feb 2024 17:20:32 +0200 +Subject: [PATCH] wifi: ath11k: rearrange IRQ enable/disable in reset path +Patch-mainline: Queued in subsystem maintainer repository +Git-commit: d455e805de706e8c1ce945a0202028c8d764b9bc +Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git +References: bsc#1207948 + +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 +Signed-off-by: Baochen Qiang +Link: https://msgid.link/20240221024725.10057-2-quic_bqiang@quicinc.com +Acked-by: Takashi Iwai + +--- + 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 +@@ -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.35.3 + diff --git a/series.conf b/series.conf index ff3b856..1164208 100644 --- a/series.conf +++ b/series.conf @@ -190,6 +190,7 @@ patches.suse/b43-missing-firmware-info.patch patches.suse/iwlwifi-cfg-Add-missing-MODULE_FIRMWARE-for-pnvm.patch + patches.suse/wifi-ath11k-rearrange-IRQ-enable-disable-in-reset-pa.patch ######################################################## # USB