[bug] mhi: ath11k: resume after hibernation is not working

From: Jose Ignacio Tornos Martinez
Date: Fri Sep 22 2023 - 08:01:42 EST


Hello,

We have several machines with QCNFA765 wireless card (WCN6856) and with
the same behavior: although hibernation seems to work, post resume is not
working due to the wireless card (if the wireless card is disabled or ath11k
driver is blacklisted, everything is working).

After hibernation, when we resume (power on), we get the following related
logs:
...
[ 9.631426] ath11k_pci 0000:03:00.0: wcn6855 hw2.1
[ 10.673834] ath11k_pci 0000:03:00.0: chip_id 0x12 chip_family 0xb board_id 0xff soc_id 0x400c1211
[ 10.683137] ath11k_pci 0000:03:00.0: fw_version 0x110b196e fw_build_timestamp 2022-12-22 12:54 fw_build_id WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.23
...
[ 123.323689] mhi mhi0: Did not enter M0 state, MHI state: M3, PM state: M3->M0
[ 123.323693] ath11k_pci 0000:03:00.0: failed to resume mhi: -5
[ 123.323695] ath11k_pci 0000:03:00.0: failed to resume hif during resume: -5
[ 123.323696] ath11k_pci 0000:03:00.0: failed to resume core: -5
[ 123.323696] ath11k_pci 0000:03:00.0: PM: dpm_run_callback(): pci_pm_restore+0x0/0xe0 returns -5
[ 123.323702] ath11k_pci 0000:03:00.0: PM: failed to restore async: error -5
[ 126.331726] ath11k_pci 0000:03:00.0: wmi command 16387 timeout
[ 126.331730] ath11k_pci 0000:03:00.0: failed to send WMI_PDEV_SET_PARAM cmd
[ 126.331732] ath11k_pci 0000:03:00.0: failed to enable dynamic bw: -11
[ 126.331734] ------------[ cut here ]------------
[ 126.331734] Hardware became unavailable upon resume. This could be a software issue prior to suspend or a hardware issue.
[ 126.331749] WARNING: CPU: 4 PID: 1967 at net/mac80211/util.c:2568 ieee80211_reconfig+0xa9/0x1660 [mac80211]
...
Linux kernel version: 6.6.0_rc2

Could you help me to fix this?
Why is M3->M0 transition not working? Could it be an issue with the firmware?

Thanks

Best regards
José Ignacio