[PATCH v2 12/26][SRU][U/OEM-5.10] UBUNTU: SAUCE: HACK: ath11k: add delays to suspend and resume handlers

You-Sheng Yang vicamo.yang at canonical.com
Fri Dec 4 15:25:06 UTC 2020


From: Kalle Valo <kvalo at codeaurora.org>

BugLink: https://bugs.launchpad.net/bugs/1879633

Resume was failing most of the time when connected to an AP. Adding these
delays seem to solve that, which points that we have a some kind of race
condition in ath11k.

This is not the proper fix, only a temporary workaround.

Signed-off-by: Kalle Valo <kvalo at codeaurora.org>
(cherry picked from commit a9ce8040a968bdbb5aad2d767298d390e2507b16
https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git)
Signed-off-by: You-Sheng Yang <vicamo.yang at canonical.com>
---
 drivers/net/wireless/ath/ath11k/pci.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/net/wireless/ath/ath11k/pci.c b/drivers/net/wireless/ath/ath11k/pci.c
index 4f058ceaa0f1..044b09463873 100644
--- a/drivers/net/wireless/ath/ath11k/pci.c
+++ b/drivers/net/wireless/ath/ath11k/pci.c
@@ -1189,10 +1189,14 @@ static __maybe_unused int ath11k_pci_pm_suspend(struct device *dev)
 	struct ath11k_base *ab = dev_get_drvdata(dev);
 	int ret;
 
+	msleep(3000);
+
 	ret = ath11k_core_suspend(ab);
 	if (ret)
 		ath11k_warn(ab, "failed to suspend hif: %d\n", ret);
 
+	msleep(3000);
+
 	return ret;
 }
 
@@ -1201,10 +1205,14 @@ static __maybe_unused int ath11k_pci_pm_resume(struct device *dev)
 	struct ath11k_base *ab = dev_get_drvdata(dev);
 	int ret;
 
+	msleep(3000);
+
 	ret = ath11k_core_resume(ab);
 	if (ret)
 		ath11k_warn(ab, "failed to resume hif: %d\n", ret);
 
+	msleep(3000);
+
 	return ret;
 }
 
-- 
2.29.2




More information about the kernel-team mailing list