If a recovery does not complete within ATH10K_RECOVERY_TIMEOUT_HZ (20 seconds), the device is marked WEDGED. This is too long when recovery gets stuck during suspend. Some platforms set the suspend watchdog as low as 25 seconds. A 20 second timeout uses up most of that time, leaving only about 5 seconds for blocked callers to return and for the driver to finish the WEDGED transition. If that is not enough, the watchdog fires and the whole system crashes. Reduce the timeout to 10 seconds. A normal recovery finishes well within this limit, and the remaining time is enough for the WEDGED transition to complete before the watchdog fires. Tested-on: QCA6174 hw3.2 PCI WLAN.RM.4.4.1-00288-QCARMSWPZ-1 Tested-on: QCA6174 hw3.2 SDIO WLAN.RMH.4.4.1-00189 Signed-off-by: Kang Yang --- drivers/net/wireless/ath/ath10k/core.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h index 2e100dd246e2..75ff555173b2 100644 --- a/drivers/net/wireless/ath/ath10k/core.h +++ b/drivers/net/wireless/ath/ath10k/core.h @@ -87,7 +87,12 @@ IEEE80211_IFACE_SKIP_SDATA_NOT_IN_DRIVER) #define ATH10K_ITER_RESUME_FLAGS (IEEE80211_IFACE_ITER_RESUME_ALL |\ IEEE80211_IFACE_SKIP_SDATA_NOT_IN_DRIVER) -#define ATH10K_RECOVERY_TIMEOUT_HZ (20 * HZ) +/* + * Some platforms configure suspend watchdogs as low as 25s; keep the + * recovery timeout well under that so the WEDGED transition and any + * teardown that follows still have room to run before it fires. + */ +#define ATH10K_RECOVERY_TIMEOUT_HZ (10 * HZ) struct ath10k; -- 2.34.1