diff options
| author | Prashanth Bhatta <bhattap@qca.qualcomm.com> | 2014-06-30 16:03:11 -0700 |
|---|---|---|
| committer | Pitani Venkata Rajesh Kumar <c_vpitan@qti.qualcomm.com> | 2014-07-09 12:13:36 +0530 |
| commit | e96cbf2ec99b7e5b71638bdde7a968eec207fabb (patch) | |
| tree | 1774ba3cc9bc2d1509fd53eb78edb40bacdbef97 | |
| parent | 6b6c914253bcc98b6076165309b20157bad83b13 (diff) | |
qcacld: pci: Set recovery flag to true during SSR shutdown
When link down recovery is going on, driver shouldn't try to
access PCIe address space. There is already a flag available to
prevent the PCIe address space access during link recovery but
flag is not set to true in SSR shutdown routine causing host
crash. Protecting SSR shutdown as well.
Change-Id: I3101227a30edddc1256dfce2d290d759f2af8747
CRs-fixed: 687631
| -rw-r--r-- | CORE/SERVICES/HIF/PCIe/hif_pci.c | 3 | ||||
| -rw-r--r-- | CORE/SERVICES/HIF/PCIe/if_pci.c | 6 |
2 files changed, 9 insertions, 0 deletions
diff --git a/CORE/SERVICES/HIF/PCIe/hif_pci.c b/CORE/SERVICES/HIF/PCIe/hif_pci.c index 66b21138ab7c..6364600d6948 100644 --- a/CORE/SERVICES/HIF/PCIe/hif_pci.c +++ b/CORE/SERVICES/HIF/PCIe/hif_pci.c @@ -2020,6 +2020,9 @@ HIF_sleep_entry(void *arg) struct hif_pci_softc *sc = hif_state->sc; u_int32_t idle_ms; + if (sc->recovery) + return; + adf_os_spin_lock_irqsave(&hif_state->keep_awake_lock); if (hif_state->verified_awake == FALSE) { idle_ms = adf_os_ticks_to_msecs(adf_os_ticks() diff --git a/CORE/SERVICES/HIF/PCIe/if_pci.c b/CORE/SERVICES/HIF/PCIe/if_pci.c index a94ce1ee37a3..e44588a33536 100644 --- a/CORE/SERVICES/HIF/PCIe/if_pci.c +++ b/CORE/SERVICES/HIF/PCIe/if_pci.c @@ -199,6 +199,10 @@ bool hif_pci_targ_is_awake(struct hif_pci_softc *sc, void *__iomem *mem) { A_UINT32 val; + + if(sc->recovery) + return false; + val = A_PCI_READ32(mem + PCIE_LOCAL_BASE_ADDRESS + RTC_STATE_ADDRESS); return (RTC_STATE_V_GET(val) == RTC_STATE_V_ON); } @@ -1622,6 +1626,8 @@ void hif_pci_shutdown(struct pci_dev *pdev) if (!sc) return; + sc->recovery = true; + if (vos_is_load_unload_in_progress(VOS_MODULE_ID_HIF, NULL)) { printk("Load/unload in progress, ignore SSR shutdown\n"); return; |
