Skip to contentSkip to conversation

ath11k: enable non-wow suspend and resume

RFC In review Carl Huang 4 participants 5 messages Nov 12, 2020 – Nov 19, 2020 Qualcomm Atheros ATH11K wireless driver

lore
Share & tools
lore

Carl Huang

author
#0 lore raw

RFC v2 1/1 ath11k: enable non-wow suspend and resume

For QCA6390, it needs to power down target when system suspends and needs to power up target when system resumes in non-wow scenario.

The power up procedure downloads firmware again.

Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1

---
v2:
. rebased to kernel/git/kvalo/ath.git 644783b
. fix a bug which downloads wrong m3 to firmware

 drivers/net/wireless/ath/ath11k/core.c | 62 +++++++++++++++++++++-----
 drivers/net/wireless/ath/ath11k/core.h |  8 ++++
 drivers/net/wireless/ath/ath11k/mac.c  | 14 ++++++
 drivers/net/wireless/ath/ath11k/pci.c  | 46 +++++++++++++++++++
 drivers/net/wireless/ath/ath11k/qmi.c  | 13 ++++--
 drivers/net/wireless/ath/ath11k/qmi.h  |  1 +
 6 files changed, 131 insertions(+), 13 deletions(-)
drivers/net/wireless/ath/ath11k/core.c +52 -10
index c23a59a29792..ec1430975934 100644
@@ -448,7 +448,20 @@ int ath11k_core_fetch_bdf(struct ath11k_base *ab, struct ath11k_board_data *bd)
 	return 0;
 }
 
-static void ath11k_core_stop(struct ath11k_base *ab)
+void ath11k_core_cutoff_stop(struct ath11k_base *ab)
+{
+	if (!test_bit(ATH11K_FLAG_CRASH_FLUSH, &ab->dev_flags))
+		ath11k_qmi_firmware_stop(ab);
+
+	ath11k_hif_stop(ab);
+	ath11k_wmi_detach(ab);
+	ath11k_thermal_unregister(ab);
+	ath11k_dp_pdev_free(ab);
+	ath11k_dp_free(ab);
+	ath11k_dp_pdev_reo_cleanup(ab);
+}
+
+void ath11k_core_stop(struct ath11k_base *ab)
 {
 	if (!test_bit(ATH11K_FLAG_CRASH_FLUSH, &ab->dev_flags))
 		ath11k_qmi_firmware_stop(ab);
@@ -503,16 +516,19 @@ static int ath11k_core_pdev_create(struct ath11k_base *ab)
 {
 	int ret;
 
-	ret = ath11k_debugfs_pdev_create(ab);
-	if (ret) {
-		ath11k_err(ab, "failed to create core pdev debugfs: %d\n", ret);
-		return ret;
-	}
+	if (!test_bit(ATH11K_FLAG_CORE_STARTING, &ab->dev_flags)) {
+		ret = ath11k_debugfs_pdev_create(ab);
+		if (ret) {
+			ath11k_err(ab, "failed to create core pdev debugfs: %d\n", ret);
+			return ret;
+		}
 
-	ret = ath11k_mac_register(ab);
-	if (ret) {
-		ath11k_err(ab, "failed register the radio with mac80211: %d\n", ret);
-		goto err_pdev_debug;
+		ret = ath11k_mac_register(ab);
+		if (ret) {
+			ath11k_err(ab, "failed register the radio with mac80211: %d\n",
+				   ret);
+			goto err_pdev_debug;
+		}
 	}
 
 	ret = ath11k_dp_pdev_alloc(ab);
@@ -717,6 +733,9 @@ int ath11k_core_qmi_firmware_ready(struct ath11k_base *ab)
 	ath11k_hif_irq_enable(ab);
 	mutex_unlock(&ab->core_lock);
 
+	if (test_bit(ATH11K_FLAG_CORE_STARTING, &ab->dev_flags))
+		complete(&ab->fw_mac_restart);
+
 	return 0;
 
 err_core_stop:
@@ -972,5 +991,28 @@ struct ath11k_base *ath11k_core_alloc(struct device *dev, size_t priv_size,
 }
 EXPORT_SYMBOL(ath11k_core_alloc);
 
+int ath11k_core_suspend(struct ath11k_base *ab)
+{
+	ath11k_hif_irq_disable(ab);
+	ath11k_core_cutoff_stop(ab);
+	ath11k_hif_power_down(ab);
+	ath11k_qmi_free_resource(ab);
+
+	return 0;
+}
+EXPORT_SYMBOL(ath11k_core_suspend);
+
+int ath11k_core_resume(struct ath11k_base *ab)
+{
+	int ret = 0;
+
+	set_bit(ATH11K_FLAG_CORE_STARTING, &ab->dev_flags);
+	init_completion(&ab->fw_mac_restart);
+	ath11k_hif_power_up(ab);
+
+	return ret;
+}
+EXPORT_SYMBOL(ath11k_core_resume);
+
 MODULE_DESCRIPTION("Core module for Qualcomm Atheros 802.11ax wireless LAN cards.");
 MODULE_LICENSE("Dual BSD/GPL");
drivers/net/wireless/ath/ath11k/core.h +8 -0
index 79224ed703db..be0914ceaf7c 100644
@@ -173,6 +173,8 @@ enum ath11k_scan_state {
 	ATH11K_SCAN_ABORTING,
 };
 
+#define  ATH11K_MAC_START_TIMEOUT (3 * HZ)
+
 enum ath11k_dev_flags {
 	ATH11K_CAC_RUNNING,
 	ATH11K_FLAG_CORE_REGISTERED,
@@ -183,6 +185,8 @@ enum ath11k_dev_flags {
 	ATH11K_FLAG_RECOVERY,
 	ATH11K_FLAG_UNREGISTERING,
 	ATH11K_FLAG_REGISTERED,
+	ATH11K_FLAG_CORE_STOPPED,
+	ATH11K_FLAG_CORE_STARTING
 };
 
 enum ath11k_monitor_flags {
@@ -735,6 +739,8 @@ struct ath11k_base {
 	u32 num_db_cap;
 
 	struct timer_list mon_reap_timer;
+	struct completion fw_mac_restart;
+
 	/* must be last */
 	u8 drv_priv[0] __aligned(sizeof(void *));
 };
@@ -894,6 +900,8 @@ void ath11k_core_halt(struct ath11k *ar);
 
 const struct firmware *ath11k_core_firmware_request(struct ath11k_base *ab,
 						    const char *filename);
+int ath11k_core_resume(struct ath11k_base *ab);
+int ath11k_core_suspend(struct ath11k_base *ab);
 
 static inline const char *ath11k_scan_state_str(enum ath11k_scan_state state)
 {
drivers/net/wireless/ath/ath11k/mac.c +14 -0
index f4aedd5aefaf..46a2363619c5 100644
@@ -15,6 +15,7 @@
 #include "testmode.h"
 #include "peer.h"
 #include "debugfs_sta.h"
+#include "hif.h"
 
 #define CHAN2G(_channel, _freq, _flags) { \
 	.band                   = NL80211_BAND_2GHZ, \
@@ -4171,6 +4172,18 @@ static int ath11k_mac_op_start(struct ieee80211_hw *hw)
 
 	switch (ar->state) {
 	case ATH11K_STATE_OFF:
+		/* mac_op_stop was called before, so here need to wait
+		 * target powered up and everything is ready.
+		 */
+		if (test_bit(ATH11K_FLAG_CORE_STARTING, &ab->dev_flags)) {
+			if (!wait_for_completion_timeout(&ab->fw_mac_restart,
+							 ATH11K_MAC_START_TIMEOUT)) {
+				ath11k_err(ab, "wait mac start timeout\n");
+				ret = -ETIMEDOUT;
+			}
+			clear_bit(ATH11K_FLAG_CORE_STARTING, &ab->dev_flags);
+			clear_bit(ATH11K_FLAG_CORE_STOPPED, &ab->dev_flags);
+		}
 		ar->state = ATH11K_STATE_ON;
 		break;
 	case ATH11K_STATE_RESTARTING:
@@ -4292,6 +4305,7 @@ static void ath11k_mac_op_stop(struct ieee80211_hw *hw)
 
 	clear_bit(ATH11K_CAC_RUNNING, &ar->dev_flags);
 	ar->state = ATH11K_STATE_OFF;
+	set_bit(ATH11K_FLAG_CORE_STOPPED, &ar->ab->dev_flags);
 	mutex_unlock(&ar->conf_mutex);
 
 	cancel_delayed_work_sync(&ar->scan.timeout);
drivers/net/wireless/ath/ath11k/pci.c +46 -0

58 lines not on this page · raw message

drivers/net/wireless/ath/ath11k/qmi.c +10 -3
index 8529b3328d24..ce808931df2b 100644
@@ -2141,6 +2141,7 @@ static void ath11k_qmi_m3_free(struct ath11k_base *ab)
 	dma_free_coherent(ab->dev, m3_mem->size,
 			  m3_mem->vaddr, m3_mem->paddr);
 	m3_mem->vaddr = NULL;
+	m3_mem->size = 0;
 }
 
 static int ath11k_qmi_wlanfw_m3_info_send(struct ath11k_base *ab)
@@ -2663,7 +2664,8 @@ static void ath11k_qmi_driver_event_work(struct work_struct *work)
 			ath11k_qmi_event_load_bdf(qmi);
 			break;
 		case ATH11K_QMI_EVENT_FW_READY:
-			if (test_bit(ATH11K_FLAG_REGISTERED, &ab->dev_flags)) {
+			if (test_bit(ATH11K_FLAG_REGISTERED, &ab->dev_flags) &&
+			    !test_bit(ATH11K_FLAG_CORE_STARTING, &ab->dev_flags)) {
 				ath11k_hal_dump_srng_stats(ab);
 				queue_work(ab->workqueue, &ab->restart_work);
 				break;
@@ -2732,12 +2734,17 @@ int ath11k_qmi_init_service(struct ath11k_base *ab)
 	return ret;
 }
 
+void ath11k_qmi_free_resource(struct ath11k_base *ab)
+{
+	ath11k_qmi_m3_free(ab);
+	ath11k_qmi_free_target_mem_chunk(ab);
+}
+
 void ath11k_qmi_deinit_service(struct ath11k_base *ab)
 {
 	qmi_handle_release(&ab->qmi.handle);
 	cancel_work_sync(&ab->qmi.event_work);
 	destroy_workqueue(ab->qmi.event_wq);
-	ath11k_qmi_m3_free(ab);
-	ath11k_qmi_free_target_mem_chunk(ab);
+	ath11k_qmi_free_resource(ab);
 }
 
drivers/net/wireless/ath/ath11k/qmi.h +1 -0
index 92925c9eac67..5d9afaf23e96 100644
@@ -467,5 +467,6 @@ void ath11k_qmi_event_work(struct work_struct *work);
 void ath11k_qmi_msg_recv_work(struct work_struct *work);
 void ath11k_qmi_deinit_service(struct ath11k_base *ab);
 int ath11k_qmi_init_service(struct ath11k_base *ab);
+void ath11k_qmi_free_resource(struct ath11k_base *ab);
 
 #endif

base-commit: 644783bad47f19cd972ab6da4cc8b047e9a5d263

Signature · 7 lines
2.29.0


-- 
ath11k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath11k
#1 lore raw
Quoted 4 lines

For QCA6390, it needs to power down target when system suspends and needs to power up target when system resumes in non-wow scenario.

The power up procedure downloads firmware again.

I've tried the patch against 5.10-rc3 (with 7fef431be9c9 reverted) and resuming from the suspend didn't bring up the wireless card QCA6390 (in Dell XPS 17):

$ journalctl -b | grep -iP '05:00|ath11k|Linux version'
Nov 13 13:47:51 razor kernel: Linux version 5.10.0-rc3 (root@razor) (gcc (Gentoo 9.3.0-r1 p3) 9.3.0, GNU ld (Gentoo 2.34 p6) 2.34.0) #8 SMP Thu Nov 12 13:56:10 CET 2020
Nov 13 13:47:51 razor kernel: pci 0000:05:00.0: [17cb:1101] type 00 class 0x028000
Nov 13 13:47:51 razor kernel: pci 0000:05:00.0: reg 0x10: [mem 0xd2100000-0xd21fffff 64bit]
Nov 13 13:47:51 razor kernel: pci 0000:05:00.0: PME# supported from D0 D3hot D3cold
Nov 13 13:47:51 razor kernel: pci 0000:05:00.0: 4.000 Gb/s available PCIe bandwidth, limited by 5.0 GT/s PCIe x1 link at 0000:00:1c.1 (capable of 7.876 Gb/s with 8.0 GT/s PCIe x1 link)
Nov 13 13:47:51 razor kernel: pci 0000:05:00.0: Adding to iommu group 21
Nov 13 13:47:52 razor kernel: ath11k_pci 0000:05:00.0: WARNING: ath11k PCI support is experimental!
Nov 13 13:47:52 razor kernel: ath11k_pci 0000:05:00.0: BAR 0: assigned [mem 0xd2100000-0xd21fffff 64bit]
Nov 13 13:47:52 razor kernel: ath11k_pci 0000:05:00.0: enabling device (0000 -> 0002)
Nov 13 13:47:52 razor kernel: mhi 0000:05:00.0: Requested to power ON
Nov 13 13:47:52 razor kernel: mhi 0000:05:00.0: Power on setup success
Nov 13 13:47:52 razor kernel: ath11k_pci 0000:05:00.0: Respond mem req failed, result: 1, err: 0
Nov 13 13:47:52 razor kernel: ath11k_pci 0000:05:00.0: qmi failed to respond fw mem req:-22
Nov 13 13:47:52 razor kernel: ath11k_pci 0000:05:00.0: chip_id 0x0 chip_family 0xb board_id 0xff soc_id 0xffffffff
Nov 13 13:47:52 razor kernel: ath11k_pci 0000:05:00.0: fw_version 0x101c06cc fw_build_timestamp 2020-06-24 19:50 fw_build_id
Nov 13 13:47:54 razor NetworkManager[791]: <info>  [1605271674.1171] rfkill1: found Wi-Fi radio killswitch (at /sys/devices/pci0000:00/0000:00:1c.1/0000:05:00.0/ieee80211/phy0/rfkill1) (driver ath11k_pci)
Nov 13 13:47:56 razor ModemManager[728]: <info>  Couldn't check support for device '/sys/devices/pci0000:00/0000:00:1c.1/0000:05:00.0': not supported by any plugin

... suspended and resumed here ...

Nov 13 14:09:13 razor kernel: ath11k_pci 0000:05:00.0: link down error during global reset
Nov 13 14:09:13 razor kernel: ath11k_pci 0000:05:00.0: link down error during global reset
Nov 13 14:09:13 razor kernel: DMAR: [INTR-REMAP] Request device [05:00.0] fault index 80 [fault reason 34] Present field in the IRTE entry is clear
Nov 13 14:09:13 razor kernel: mhi 0000:05:00.0: Requested to power ON
Nov 13 14:09:13 razor kernel: mhi 0000:05:00.0: Power on setup success
Nov 13 14:09:13 razor kernel: ath11k_pci 0000:05:00.0: Respond mem req failed, result: 1, err: 0
Nov 13 14:09:13 razor kernel: ath11k_pci 0000:05:00.0: qmi failed to respond fw mem req:-22
Nov 13 14:09:13 razor kernel: ath11k_pci 0000:05:00.0: chip_id 0x0 chip_family 0xb board_id 0xff soc_id 0xffffffff
Nov 13 14:09:13 razor kernel: ath11k_pci 0000:05:00.0: fw_version 0x101c06cc fw_build_timestamp 2020-06-24 19:50 fw_build_id
Nov 13 14:09:13 razor kernel: ath11k_pci 0000:05:00.0: failed to connect to HTT: -108
Nov 13 14:09:13 razor kernel: ath11k_pci 0000:05:00.0: failed to start core: -108
Nov 13 14:09:16 razor ModemManager[728]: <info>  Couldn't check support for device '/sys/devices/pci0000:00/0000:00:1c.1/0000:05:00.0': not supported by any plugin
Nov 13 14:09:17 razor kernel: ath11k_pci 0000:05:00.0: wait mac start timeout
Nov 13 14:09:17 razor kernel: ath11k_pci 0000:05:00.0: failed to send WMI_PDEV_SET_PARAM cmd
Nov 13 14:09:17 razor kernel: ath11k_pci 0000:05:00.0: failed to enable PMF QOS: (-108
Nov 13 14:09:17 razor kernel: ath11k_pci 0000:05:00.0: failed to send WMI_PDEV_SET_PARAM cmd
Nov 13 14:09:17 razor kernel: ath11k_pci 0000:05:00.0: failed to enable PMF QOS: (-108
Nov 13 14:09:17 razor kernel: ath11k_pci 0000:05:00.0: failed to send WMI_PDEV_SET_PARAM cmd
Nov 13 14:09:17 razor kernel: ath11k_pci 0000:05:00.0: failed to enable PMF QOS: (-108
Nov 13 14:09:27 razor kernel: ath11k_pci 0000:05:00.0: failed to send WMI_PDEV_SET_PARAM cmd
Nov 13 14:09:27 razor kernel: ath11k_pci 0000:05:00.0: failed to enable PMF QOS: (-108
Nov 13 14:09:27 razor kernel: ath11k_pci 0000:05:00.0: failed to send WMI_PDEV_SET_PARAM cmd
Nov 13 14:09:27 razor kernel: ath11k_pci 0000:05:00.0: failed to enable PMF QOS: (-108
Nov 13 14:09:37 razor kernel: ath11k_pci 0000:05:00.0: failed to send WMI_PDEV_SET_PARAM cmd
Nov 13 14:09:37 razor kernel: ath11k_pci 0000:05:00.0: failed to enable PMF QOS: (-108
Nov 13 14:09:37 razor kernel: ath11k_pci 0000:05:00.0: failed to send WMI_PDEV_SET_PARAM cmd
Nov 13 14:09:37 razor kernel: ath11k_pci 0000:05:00.0: failed to enable PMF QOS: (-108
Nov 13 14:09:41 razor NetworkManager[791]: <info>  [1605272981.9889] radio killswitch /sys/devices/pci0000:00/0000:00:1c.1/0000:05:00.0/ieee80211/phy0/rfkill1 disappeared
Signature · 3 lines
ath11k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath11k
#3 lore raw
In reply to Carl Huang
reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # install arm cross compiling tool for…

Hi Carl,

[FYI, it's a private test report for your RFC patch.] [auto build test WARNING on 644783bad47f19cd972ab6da4cc8b047e9a5d263]

url:    https://github.com/0day-ci/linux/commits/Carl-Huang/ath11k-enable-non-wow-suspend-and-resume/20201112-142917
base:    644783bad47f19cd972ab6da4cc8b047e9a5d263
config: arm-randconfig-r014-20201113 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 9a85643cd357e412cff69067bb5c4840e228c2ab)

reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://github.com/0day-ci/linux/commit/fc75e1f1b037d012b954fb3f15ac4815e8549be0
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Carl-Huang/ath11k-enable-non-wow-suspend-and-resume/20201112-142917 git checkout fc75e1f1b037d012b954fb3f15ac4815e8549be0
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm

If you fix the issue, kindly add following tag as appropriate

All warnings (new ones prefixed by >>):

>> drivers/net/wireless/ath/ath11k/core.c:451:6: warning: no previous prototype for function 'ath11k_core_cutoff_stop' [-Wmissing-prototypes]
   void ath11k_core_cutoff_stop(struct ath11k_base *ab)
        ^
   drivers/net/wireless/ath/ath11k/core.c:451:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void ath11k_core_cutoff_stop(struct ath11k_base *ab)
   ^
   static 
>> drivers/net/wireless/ath/ath11k/core.c:464:6: warning: no previous prototype for function 'ath11k_core_stop' [-Wmissing-prototypes]
   void ath11k_core_stop(struct ath11k_base *ab)
        ^

drivers/net/wireless/ath/ath11k/core.c:464:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void ath11k_core_stop(struct ath11k_base *ab)
^
static
2 warnings generated.

vim +/ath11k_core_cutoff_stop +451 drivers/net/wireless/ath/ath11k/core.c

450

 > 451	void ath11k_core_cutoff_stop(struct ath11k_base *ab)
   452	{
   453		if (!test_bit(ATH11K_FLAG_CRASH_FLUSH, &ab->dev_flags))
   454			ath11k_qmi_firmware_stop(ab);
   455	
   456		ath11k_hif_stop(ab);
   457		ath11k_wmi_detach(ab);
   458		ath11k_thermal_unregister(ab);
   459		ath11k_dp_pdev_free(ab);
   460		ath11k_dp_free(ab);
   461		ath11k_dp_pdev_reo_cleanup(ab);
   462	}
   463	
 > 464	void ath11k_core_stop(struct ath11k_base *ab)

465 {
466 if (!test_bit(ATH11K_FLAG_CRASH_FLUSH, &ab->dev_flags))
467 ath11k_qmi_firmware_stop(ab);
468
469 ath11k_hif_stop(ab);
470 ath11k_wmi_detach(ab);
471 ath11k_dp_pdev_reo_cleanup(ab);
472
473 /* De-Init of components as needed */
474 }
475

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

#2 lore raw
In reply to Pavel Procopiuc
Quoted 64 lines · Pavel Procopiuc
Quoted 5 lines

For QCA6390, it needs to power down target when system suspends and needs to power up target when system resumes in non-wow scenario.

The power up procedure downloads firmware again.

I've tried the patch against 5.10-rc3 (with 7fef431be9c9 reverted) and resuming from the suspend didn't bring up the wireless card QCA6390 (in Dell XPS 17):

$ journalctl -b | grep -iP '05:00|ath11k|Linux version'
Nov 13 13:47:51 razor kernel: Linux version 5.10.0-rc3 (root@razor) (gcc (Gentoo 9.3.0-r1 p3) 9.3.0, GNU ld (Gentoo 2.34
p6) 2.34.0) #8 SMP Thu Nov 12 13:56:10 CET 2020
Nov 13 13:47:51 razor kernel: pci 0000:05:00.0: [17cb:1101] type 00 class 0x028000
Nov 13 13:47:51 razor kernel: pci 0000:05:00.0: reg 0x10: [mem 0xd2100000-0xd21fffff 64bit]
Nov 13 13:47:51 razor kernel: pci 0000:05:00.0: PME# supported from D0 D3hot D3cold
Nov 13 13:47:51 razor kernel: pci 0000:05:00.0: 4.000 Gb/s available PCIe bandwidth, limited by 5.0 GT/s PCIe x1 link at
0000:00:1c.1 (capable of 7.876 Gb/s with 8.0 GT/s PCIe x1 link)
Nov 13 13:47:51 razor kernel: pci 0000:05:00.0: Adding to iommu group 21
Nov 13 13:47:52 razor kernel: ath11k_pci 0000:05:00.0: WARNING: ath11k PCI support is experimental!
Nov 13 13:47:52 razor kernel: ath11k_pci 0000:05:00.0: BAR 0: assigned [mem 0xd2100000-0xd21fffff 64bit]
Nov 13 13:47:52 razor kernel: ath11k_pci 0000:05:00.0: enabling device (0000 -> 0002)
Nov 13 13:47:52 razor kernel: mhi 0000:05:00.0: Requested to power ON
Nov 13 13:47:52 razor kernel: mhi 0000:05:00.0: Power on setup success
Nov 13 13:47:52 razor kernel: ath11k_pci 0000:05:00.0: Respond mem req failed, result: 1, err: 0
Nov 13 13:47:52 razor kernel: ath11k_pci 0000:05:00.0: qmi failed to respond fw mem req:-22
Nov 13 13:47:52 razor kernel: ath11k_pci 0000:05:00.0: chip_id 0x0 chip_family 0xb board_id 0xff soc_id 0xffffffff
Nov 13 13:47:52 razor kernel: ath11k_pci 0000:05:00.0: fw_version 0x101c06cc fw_build_timestamp 2020-06-24 19:50 fw_build_id
Nov 13 13:47:54 razor NetworkManager[791]: <info>  [1605271674.1171] rfkill1: found Wi-Fi radio killswitch (at
/sys/devices/pci0000:00/0000:00:1c.1/0000:05:00.0/ieee80211/phy0/rfkill1) (driver ath11k_pci)
Nov 13 13:47:56 razor ModemManager[728]: <info>  Couldn't check support for device
'/sys/devices/pci0000:00/0000:00:1c.1/0000:05:00.0': not supported by any plugin

... suspended and resumed here ...

Nov 13 14:09:13 razor kernel: ath11k_pci 0000:05:00.0: link down error during global reset
Nov 13 14:09:13 razor kernel: ath11k_pci 0000:05:00.0: link down error during global reset
Nov 13 14:09:13 razor kernel: DMAR: [INTR-REMAP] Request device [05:00.0] fault index 80 [fault reason 34] Present field
in the IRTE entry is clear
Nov 13 14:09:13 razor kernel: mhi 0000:05:00.0: Requested to power ON
Nov 13 14:09:13 razor kernel: mhi 0000:05:00.0: Power on setup success
Nov 13 14:09:13 razor kernel: ath11k_pci 0000:05:00.0: Respond mem req failed, result: 1, err: 0
Nov 13 14:09:13 razor kernel: ath11k_pci 0000:05:00.0: qmi failed to respond fw mem req:-22
Nov 13 14:09:13 razor kernel: ath11k_pci 0000:05:00.0: chip_id 0x0 chip_family 0xb board_id 0xff soc_id 0xffffffff
Nov 13 14:09:13 razor kernel: ath11k_pci 0000:05:00.0: fw_version 0x101c06cc fw_build_timestamp 2020-06-24 19:50 fw_build_id
Nov 13 14:09:13 razor kernel: ath11k_pci 0000:05:00.0: failed to connect to HTT: -108
Nov 13 14:09:13 razor kernel: ath11k_pci 0000:05:00.0: failed to start core: -108
Nov 13 14:09:16 razor ModemManager[728]: <info>  Couldn't check support for device
'/sys/devices/pci0000:00/0000:00:1c.1/0000:05:00.0': not supported by any plugin
Nov 13 14:09:17 razor kernel: ath11k_pci 0000:05:00.0: wait mac start timeout
Nov 13 14:09:17 razor kernel: ath11k_pci 0000:05:00.0: failed to send WMI_PDEV_SET_PARAM cmd
Nov 13 14:09:17 razor kernel: ath11k_pci 0000:05:00.0: failed to enable PMF QOS: (-108
Nov 13 14:09:17 razor kernel: ath11k_pci 0000:05:00.0: failed to send WMI_PDEV_SET_PARAM cmd
Nov 13 14:09:17 razor kernel: ath11k_pci 0000:05:00.0: failed to enable PMF QOS: (-108
Nov 13 14:09:17 razor kernel: ath11k_pci 0000:05:00.0: failed to send WMI_PDEV_SET_PARAM cmd
Nov 13 14:09:17 razor kernel: ath11k_pci 0000:05:00.0: failed to enable PMF QOS: (-108
Nov 13 14:09:27 razor kernel: ath11k_pci 0000:05:00.0: failed to send WMI_PDEV_SET_PARAM cmd
Nov 13 14:09:27 razor kernel: ath11k_pci 0000:05:00.0: failed to enable PMF QOS: (-108
Nov 13 14:09:27 razor kernel: ath11k_pci 0000:05:00.0: failed to send WMI_PDEV_SET_PARAM cmd
Nov 13 14:09:27 razor kernel: ath11k_pci 0000:05:00.0: failed to enable PMF QOS: (-108
Nov 13 14:09:37 razor kernel: ath11k_pci 0000:05:00.0: failed to send WMI_PDEV_SET_PARAM cmd
Nov 13 14:09:37 razor kernel: ath11k_pci 0000:05:00.0: failed to enable PMF QOS: (-108
Nov 13 14:09:37 razor kernel: ath11k_pci 0000:05:00.0: failed to send WMI_PDEV_SET_PARAM cmd
Nov 13 14:09:37 razor kernel: ath11k_pci 0000:05:00.0: failed to enable PMF QOS: (-108
Nov 13 14:09:41 razor NetworkManager[791]: <info>  [1605272981.9889] radio killswitch
Quoted 6 lines

/sys/devices/pci0000:00/0000:00:1c.1/0000:05:00.0/ieee80211/phy0/rfkill1 disappeared

--
ath11k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath11k

I was also able to try this on the xps 13 9310 with similar results:

[  439.639090] ath11k_pci 0000:55:00.0: Respond mem req failed,
result: 1, err: 0
[  439.639096] ath11k_pci 0000:55:00.0: qmi failed to respond fw mem req:-22
[  439.640549] ath11k_pci 0000:55:00.0: req mem_seg[0] 0x28200000 524288 1
[  439.640552] ath11k_pci 0000:55:00.0: req mem_seg[1] 0x28280000 524288 1
[  439.640554] ath11k_pci 0000:55:00.0: req mem_seg[2] 0x28300000 524288 1
[  439.640556] ath11k_pci 0000:55:00.0: req mem_seg[3] 0x28380000 294912 1
[  439.640558] ath11k_pci 0000:55:00.0: req mem_seg[4] 0x27c00000 524288 1
[  439.640559] ath11k_pci 0000:55:00.0: req mem_seg[5] 0x27c80000 524288 1
[  439.640561] ath11k_pci 0000:55:00.0: req mem_seg[6] 0x27d00000 458752 1
[  439.640563] ath11k_pci 0000:55:00.0: req mem_seg[7] 0x28160000 131072 1
[  439.640564] ath11k_pci 0000:55:00.0: req mem_seg[8] 0x27d80000 524288 4
[  439.640566] ath11k_pci 0000:55:00.0: req mem_seg[9] 0x27e00000 360448 4
[  439.640568] ath11k_pci 0000:55:00.0: req mem_seg[10] 0x27980000 16384 1
[  439.648216] ath11k_pci 0000:55:00.0: chip_id 0x0 chip_family 0xb
board_id 0xff soc_id 0xffffffff
[  439.648220] ath11k_pci 0000:55:00.0: fw_version 0x101c06cc
fw_build_timestamp 2020-06-24 19:50 fw_build_id
[  439.699224] ath11k_pci 0000:55:00.0: failed to connect to HTT: -108
[  439.702026] ath11k_pci 0000:55:00.0: failed to start core: -108
[  442.623528] ath11k_pci 0000:55:00.0: wait mac start timeout
[  442.623536] ath11k_pci 0000:55:00.0: failed to send WMI_PDEV_SET_PARAM cmd
[  442.623538] ath11k_pci 0000:55:00.0: failed to enable PMF QOS: (-108
[  442.625125] ath11k_pci 0000:55:00.0: failed to send WMI_PDEV_SET_PARAM cmd
[  442.625127] ath11k_pci 0000:55:00.0: failed to enable PMF QOS: (-108
[  442.625324] ath11k_pci 0000:55:00.0: failed to send WMI_PDEV_SET_PARAM cmd
[  442.625326] ath11k_pci 0000:55:00.0: failed to enable PMF QOS: (-108
Signature · 3 lines
ath11k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath11k
#4 lore raw
In reply to Carl Huang
reproduce (this is a W=1 build):

Hi Carl,

[FYI, it's a private test report for your RFC patch.] [auto build test WARNING on 644783bad47f19cd972ab6da4cc8b047e9a5d263]

url:    https://github.com/0day-ci/linux/commits/Carl-Huang/ath11k-enable-non-wow-suspend-and-resume/20201112-142917
base:    644783bad47f19cd972ab6da4cc8b047e9a5d263
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
        # https://github.com/0day-ci/linux/commit/fc75e1f1b037d012b954fb3f15ac4815e8549be0
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Carl-Huang/ath11k-enable-non-wow-suspend-and-resume/20201112-142917
        git checkout fc75e1f1b037d012b954fb3f15ac4815e8549be0
        # save the attached .config to linux build tree
        make W=1 ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate

All warnings (new ones prefixed by >>):

>> drivers/net/wireless/ath/ath11k/core.c:451:6: warning: no previous prototype for 'ath11k_core_cutoff_stop' [-Wmissing-prototypes]
     451 | void ath11k_core_cutoff_stop(struct ath11k_base *ab)
         |      ^~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/wireless/ath/ath11k/core.c:464:6: warning: no previous prototype for 'ath11k_core_stop' [-Wmissing-prototypes]
     464 | void ath11k_core_stop(struct ath11k_base *ab)
         |      ^~~~~~~~~~~~~~~~

vim +/ath11k_core_cutoff_stop +451 drivers/net/wireless/ath/ath11k/core.c

450

 > 451	void ath11k_core_cutoff_stop(struct ath11k_base *ab)
   452	{
   453		if (!test_bit(ATH11K_FLAG_CRASH_FLUSH, &ab->dev_flags))
   454			ath11k_qmi_firmware_stop(ab);
   455	
   456		ath11k_hif_stop(ab);
   457		ath11k_wmi_detach(ab);
   458		ath11k_thermal_unregister(ab);
   459		ath11k_dp_pdev_free(ab);
   460		ath11k_dp_free(ab);
   461		ath11k_dp_pdev_reo_cleanup(ab);
   462	}
   463	
 > 464	void ath11k_core_stop(struct ath11k_base *ab)

465 {
466 if (!test_bit(ATH11K_FLAG_CRASH_FLUSH, &ab->dev_flags))
467 ath11k_qmi_firmware_stop(ab);
468
469 ath11k_hif_stop(ab);
470 ath11k_wmi_detach(ab);
471 ath11k_dp_pdev_reo_cleanup(ab);
472
473 /* De-Init of components as needed */
474 }
475

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org