rproc_boot() takes a power reference when it succeeds. If the RootPD fails to signal that it is ready, ath12k returns without balancing that reference. The remote processor can remain powered after probe fails, and later boot and shutdown calls operate with an unbalanced power count. Call rproc_shutdown() before returning the timeout error to balance the successful rproc_boot(). This unwind is only safe once RootPD boot is serialized across UserPDs. Before commit c6ab3b1dfa3e ("wifi: ath12k: Share RootPD state across UserPDs to avoid duplicate operations"), another UserPD could observe a running RootPD and skip rproc_boot(), so it held no matching power reference, and shutting down from a timing-out probe could power off a RootPD that UserPD still needed. Older trees therefore need more than this one-line change. Fixes: 10a355ba6238 ("wifi: ath12k: Power up root PD") Signed-off-by: Linmao Li --- Not tested on hardware; no IPQ5332 AHB device was available. The change was verified by code inspection and a W=1 build of the affected object. drivers/net/wireless/ath/ath12k/ahb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/ath/ath12k/ahb.c b/drivers/net/wireless/ath/ath12k/ahb.c index 0fc55c9169e1a..39956a97fe915 100644 --- a/drivers/net/wireless/ath/ath12k/ahb.c +++ b/drivers/net/wireless/ath/ath12k/ahb.c @@ -955,6 +955,7 @@ static int ath12k_ahb_boot_root_pd(struct ath12k_base *ab) ATH12K_ROOTPD_READY_TIMEOUT); if (!time_left) { ath12k_err(ab, "RootPD ready wait timed out\n"); + rproc_shutdown(g_rproc_info->tgt_rproc); return -ETIMEDOUT; } base-commit: 8b8202b2e31367434a5079a6faee31588e5b4aa4 -- 2.25.1