wifi: ath12k: recover from a firmware crash during resume
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest4 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | wifi: ath12k: disable and enable the CE interrupts only oncedrivers/ | +4 | 0 replies | |
| 2/4 | wifi: ath12k: do not wait in resume for a reset that cannot finish theredrivers/ drivers/ | +7 | 0 replies | |
| 3/4 | wifi: ath12k: unregister the thermal devices of a radio only oncedrivers/ | +1 | 0 replies | |
| 4/4 | wifi: ath12k: skip the links without a radio when a scan failsdrivers/ | +3 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/4] wifi: ath12k: recover from a firmware crash during resume
On my device the firmware sometimes crashes during the cold boot of a resume from s2idle (no WoWLAN, so the device is powered down in suspend). Without these patches the driver does not recover: the resume takes 20 s longer, pci_pm_resume returns -110 and the device is dead until a reboot. Patches 1 and 2 fix that. Patches 3 and 4 fix two oopses I hit when the firmware crashed more than once in a row while testing them.
Platform: OnePlus Pad 3 (SM8750) with a WCN7880 hw2.0 (PCI 17cb:110e), firmware WLAN.GNG.1.0-03342-QCAGNGSWPL_V1.0_V2.0_SILICONZ-1.81206.153. ath-next does not support this chip; I run it with an out-of-tree patch that adds it as a WCN7850 derivative, on v7.3-rc5 plus board patches. For that reason the patches carry no Tested-on tag. On ath-next (ff4c7359e310) the series is only build tested.
The firmware crash itself is not addressed here; I am sending a separate report about it. It happened in 1 of 64 and in 1 of 240 suspend cycles.
Tests, all on the tree described above:
- Patches 1-3, crash forced with ath12k_mhi_force_rddm() at the ATH12K_QMI_EVENT_FW_READY event of the resume boot: 6 of 6 resumes recovered, the link was back 16 s after the resume (6 s without a crash). The same build without patch 1 fails like the natural crash ("Service connect timeout", "failed to connect to HTT: -110").
- Patches 1-3, no forced crash: 240 suspend cycles, the firmware crashed once and the driver recovered, 16 s.
- Patch 4, two forced crashes in a row, the second 3 to 9 s after "pdev 0 successfully recovered", followed by "iw scan trigger":
without the patch the oops in 2 of 2 runs, on the first pair; with it 12 pairs without one.
The test hook is not part of the series; I can post it if it is of use.
Two things I would like comments on:
- Patch 2 lets ath12k_core_resume() return while the reset is still running. The alternative I tried, keeping the MHI devices over the reset as suspend does (ath12k_hif_power_down(ab, true)), does not
work: QMI stays silent after the second power up.
- With the series a crash during resume still ends in "Hardware became unavailable upon resume" from ieee80211_reconfig(), as the device is not up yet when mac80211 resumes, and userspace has to bring the interface up again. That is where the 16 s come from. I have not tried to change that.
I used an AI assistant (Claude) for the analysis and to draft the patches and their descriptions; I reviewed the result and ran the tests on my device.
Vladyslav Tymoshchuk (4):
wifi: ath12k: disable and enable the CE interrupts only once
wifi: ath12k: do not wait in resume for a reset that cannot finish
there
wifi: ath12k: unregister the thermal devices of a radio only once
wifi: ath12k: skip the links without a radio when a scan fails
drivers/net/wireless/ath/ath12k/core.c | 6 ++++++ drivers/net/wireless/ath/ath12k/core.h | 1 + drivers/net/wireless/ath/ath12k/mac.c | 3 +++ drivers/net/wireless/ath/ath12k/pci.c | 6 ++++-- drivers/net/wireless/ath/ath12k/thermal.c | 2 +- 5 files changed, 15 insertions(+), 3 deletions(-)
base-commit: ff4c7359e310744a7abe53cf66d921fa2969eb19
Signature · 1 line
2.43.0