From 528d6ccd708c758ac7c5196dc084a62bc13e8956 Mon Sep 17 00:00:00 2001 From: Alan Chen Date: Tue, 14 Apr 2020 17:08:54 -0700 Subject: [PATCH] qcacmn: Add check to avoid panic if FW is down In order to avoid panic in hif_pci_runtime_pm_warn(), call qdf_is_fw_down() to check if fw is down. If fw is down, return without panicking. Change-Id: I3fd3e0334220c1cf3ae6b3ec3fd5b1ede1705013 CRs-Fixed: 2664133 --- hif/src/pcie/if_pci.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hif/src/pcie/if_pci.c b/hif/src/pcie/if_pci.c index ae390f427de3..470dc5787ad6 100644 --- a/hif/src/pcie/if_pci.c +++ b/hif/src/pcie/if_pci.c @@ -1004,6 +1004,11 @@ static void hif_pci_runtime_pm_warn(struct hif_pci_softc *sc, const char *msg) ctx->name, ctx->timeout); } + if (qdf_is_fw_down()) { + hif_err("fw is down"); + return; + } + QDF_DEBUG_PANIC("hif_pci_runtime_pm_warn"); }