ATH10K_THERMAL_SYNC_TIMEOUT_HZ is currently 5s. That is an awfully long time to hold a lock. Some firmware never responds, and some only fails sporadically. Tests showed an average read time of 90us to 200us on QCA9984, QCA9888 and QCA9886. Set the timeout to 100ms. This is still far above any nominal read time. Tested-on: QCA9984 hw1.0 PCI 10.4-3.10-00047 Tested-on: QCA9888 hw2.0 PCI 10.4-3.10-00076 Signed-off-by: Nicolas Escande --- drivers/net/wireless/ath/ath10k/thermal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/thermal.h b/drivers/net/wireless/ath/ath10k/thermal.h index c25795307363..d80f1a77dd52 100644 --- a/drivers/net/wireless/ath/ath10k/thermal.h +++ b/drivers/net/wireless/ath/ath10k/thermal.h @@ -9,7 +9,7 @@ #define ATH10K_QUIET_PERIOD_MIN 25 #define ATH10K_QUIET_START_OFFSET 10 #define ATH10K_HWMON_NAME_LEN 15 -#define ATH10K_THERMAL_SYNC_TIMEOUT_HZ (5 * HZ) +#define ATH10K_THERMAL_SYNC_TIMEOUT_HZ msecs_to_jiffies(100) #define ATH10K_THERMAL_MAX_TIMEOUTS 3 #define ATH10K_THERMAL_THROTTLE_MAX 100 -- 2.56.1