diff options
| author | Rajeev Kumar <rajekuma@qca.qualcomm.com> | 2014-02-06 17:10:37 -0800 |
|---|---|---|
| committer | Akash Patel <c_akashp@qca.qualcomm.com> | 2014-02-07 23:06:11 -0800 |
| commit | 364bcb08d448482aa7548f968a4be633730d363b (patch) | |
| tree | 4609a80ba3b9a8a72f43b2608d5a87f8cab3ba1b | |
| parent | 34cea8fd8eeb88b16368edd61fa357d988f8e004 (diff) | |
qcacld: Fix of kernel panic in PCIe interrupt handler
Host driver is receiving interrupt from FW even before its
data structures are initialized so adding check for init done
before de-referencing hif_state from sc
Change-Id: I1564ea2fb00804afed47449eace141b1ecd115a2
CRs-Fixed: 612706
| -rw-r--r-- | CORE/SERVICES/HIF/PCIe/if_pci.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/CORE/SERVICES/HIF/PCIe/if_pci.c b/CORE/SERVICES/HIF/PCIe/if_pci.c index 90b4ccab0b28..6c7429a294e0 100644 --- a/CORE/SERVICES/HIF/PCIe/if_pci.c +++ b/CORE/SERVICES/HIF/PCIe/if_pci.c @@ -102,13 +102,12 @@ hif_pci_interrupt_handler(int irq, void *arg) { struct hif_pci_softc *sc = (struct hif_pci_softc *) arg; struct HIF_CE_state *hif_state = (struct HIF_CE_state *)sc->hif_device; - A_target_id_t targid = hif_state->targid; volatile int tmp; if (LEGACY_INTERRUPTS(sc)) { if (sc->hif_init_done == TRUE) - A_TARGET_ACCESS_BEGIN(targid); + A_TARGET_ACCESS_BEGIN(hif_state->targid); /* Clear Legacy PCI line interrupts */ /* IMPORTANT: INTR_CLR regiser has to be set after INTR_ENABLE is set to 0, */ @@ -123,7 +122,7 @@ hif_pci_interrupt_handler(int irq, void *arg) VOS_BUG(0); } if (sc->hif_init_done == TRUE) - A_TARGET_ACCESS_END(targid); + A_TARGET_ACCESS_END(hif_state->targid); } /* TBDXXX: Add support for WMAC */ @@ -411,7 +410,6 @@ wlan_tasklet(unsigned long data) { struct hif_pci_softc *sc = (struct hif_pci_softc *) data; struct HIF_CE_state *hif_state = (struct HIF_CE_state *)sc->hif_device; - A_target_id_t targid = hif_state->targid; volatile int tmp; if (sc->hif_init_done == FALSE) { @@ -434,7 +432,7 @@ irq_handled: if (LEGACY_INTERRUPTS(sc)) { if (sc->hif_init_done == TRUE) - A_TARGET_ACCESS_BEGIN(targid); + A_TARGET_ACCESS_BEGIN(hif_state->targid); /* Enable Legacy PCI line interrupts */ A_PCI_WRITE32(sc->mem+(SOC_CORE_BASE_ADDRESS | PCIE_INTR_ENABLE_ADDRESS), @@ -443,7 +441,7 @@ irq_handled: tmp = A_PCI_READ32(sc->mem+(SOC_CORE_BASE_ADDRESS | PCIE_INTR_ENABLE_ADDRESS)); if (sc->hif_init_done == TRUE) - A_TARGET_ACCESS_END(targid); + A_TARGET_ACCESS_END(hif_state->targid); } } |
