summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGovind Singh <govinds@codeaurora.org>2016-10-27 17:33:01 +0530
committerAnjaneedevi Kapparapu <akappa@codeaurora.org>2016-11-11 19:44:53 +0530
commit37b66dfa8221de434529b0ac1b839396fcdcbc94 (patch)
tree8715efbff54f9a5810b90ecf8863ae44331caf8d
parentcab730d29ded331721d23229f02506ab3cef2d8e (diff)
qcacld-2.0: In D0-WoW don't enable/disable tasklet
Disabling Tasklet in D0-wow will results in crashes, as the interrupt raised in not processed as the APPS resume is not complete. If there are packets in the CE ring during this phase, the SW is not reaping those packets and results in crashes. Fix is by skipping tasklet enable/disable for D0-WoW to ensure we process the interrupts even during resume sequence. D0-WoW condition is checked with any connected client on SAP interface. Change-Id: I23992ad7b4e3df3ff00329971291c3917201ac99 CRs-Fixed: 1067155
-rw-r--r--CORE/SERVICES/HIF/PCIe/if_pci.c41
1 files changed, 39 insertions, 2 deletions
diff --git a/CORE/SERVICES/HIF/PCIe/if_pci.c b/CORE/SERVICES/HIF/PCIe/if_pci.c
index 597eae8008f4..018855cfe252 100644
--- a/CORE/SERVICES/HIF/PCIe/if_pci.c
+++ b/CORE/SERVICES/HIF/PCIe/if_pci.c
@@ -2722,6 +2722,43 @@ void hif_pci_crash_shutdown(struct pci_dev *pdev)
#define OL_ATH_PCI_PM_CONTROL 0x44
+/**
+ * hif_disable_tasklet_noclient() - API to disable tasklet in D3WOW
+ * @sc: HIF Context
+ * @wma_hdl: WMA Handle
+ *
+ * This API allows to disable the tasklet in D3-wow
+ * cases.
+ *
+ * Return: None
+ */
+static void hif_disable_tasklet_noclient(struct hif_pci_softc *sc,
+ void *wma_hdl)
+{
+ if (!wma_get_client_count(wma_hdl)) {
+ tasklet_disable(&sc->intr_tq);
+ pr_debug("%s: tasklet disabled\n", __func__);
+ }
+}
+
+/**
+ * hif_enable_tasklet_noclient() - API to enable tasklet in D3WOW
+ * @sc: HIF Context
+ * @wma_hdl: WMA Handle
+ *
+ * This API allows to enable the tasklet in D3-wow
+ * cases.
+ *
+ * Return: None
+ */
+static void hif_enable_tasklet_noclient(struct hif_pci_softc *sc, void *wma_hdl)
+{
+ if (!wma_get_client_count(wma_hdl)) {
+ tasklet_enable(&sc->intr_tq);
+ pr_debug("%s: tasklet disabled\n", __func__);
+ }
+}
+
static int
__hif_pci_suspend(struct pci_dev *pdev, pm_message_t state, bool runtime_pm)
{
@@ -2799,7 +2836,7 @@ __hif_pci_suspend(struct pci_dev *pdev, pm_message_t state, bool runtime_pm)
msleep(10);
}
- tasklet_disable(&sc->intr_tq);
+ hif_disable_tasklet_noclient(sc, temp_module);
hif_irq_record(HIF_SUSPEND_AFTER_WOW, sc);
#ifdef FEATURE_WLAN_D0WOW
@@ -3025,7 +3062,7 @@ skip:
goto out;
}
- tasklet_enable(&sc->intr_tq);
+ hif_enable_tasklet_noclient(sc, temp_module);
if (!wma_is_wow_mode_selected(temp_module))
err = wma_resume_target(temp_module, runtime_pm);