]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ath10k: increase pci wakeup timeout to 30 ms
authorMaharaja Kennadyrajan <c_mkenna@qti.qualcomm.com>
Tue, 6 Oct 2015 12:19:28 +0000 (15:19 +0300)
committerKalle Valo <kvalo@qca.qualcomm.com>
Fri, 9 Oct 2015 08:33:50 +0000 (11:33 +0300)
It is noticed that pci wakeup time is exceeding current timeout (10ms)
randomly which is tested on QCA988x. So, the wake up time is increased
to 30 ms and added debug prints to log total timeout.

Signed-off-by: Maharaja Kennadyrajan <c_mkenna@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/pci.c
drivers/net/wireless/ath/ath10k/pci.h

index 61df93e2e1c959a7e01703c9c5dec21eb5431dbb..7af39118b1f4af4427288b997dfa976a115d1a20 100644 (file)
@@ -452,8 +452,12 @@ static int ath10k_pci_wake_wait(struct ath10k *ar)
        int curr_delay = 5;
 
        while (tot_delay < PCIE_WAKE_TIMEOUT) {
-               if (ath10k_pci_is_awake(ar))
+               if (ath10k_pci_is_awake(ar)) {
+                       if (tot_delay > PCIE_WAKE_LATE_US)
+                               ath10k_warn(ar, "device wakeup took %d ms which is unusally long, otherwise it works normally.\n",
+                                           tot_delay / 1000);
                        return 0;
+               }
 
                udelay(curr_delay);
                tot_delay += curr_delay;
index 8d364fb8f743eb6f8ed488c88d83b8adf25b6536..54af2d7fbe7b734f8efdc6ae41ac639a28213bba 100644 (file)
@@ -230,7 +230,8 @@ static inline struct ath10k_pci *ath10k_pci_priv(struct ath10k *ar)
 
 #define ATH10K_PCI_RX_POST_RETRY_MS 50
 #define ATH_PCI_RESET_WAIT_MAX 10 /* ms */
-#define PCIE_WAKE_TIMEOUT 10000        /* 10ms */
+#define PCIE_WAKE_TIMEOUT 30000        /* 30ms */
+#define PCIE_WAKE_LATE_US 10000        /* 10ms */
 
 #define BAR_NUM 0