From e40743bbf278c61c1c3f8d9fa388fa30b67c010a Mon Sep 17 00:00:00 2001 From: Manikanta Pubbisetty Date: Sun, 21 Mar 2021 23:56:38 +0530 Subject: [PATCH] qcacmn: use disable_irq for EXT GRP IRQs Currently, as part of device suspend, EXT GRP IRQs are disabled. disable_irq_nosync() which is currently being used to disable interrupts will not wait for pending IRQs to completion. With this API, there is a chance where IRQ handler can be executed after the device suspend. Use disable_irq() instead so that pending IRQs will be completed before returing from disable_irq(). CRs-Fixed: 2904518 Change-Id: Ib9acabe89b0337add82918be24b4782a6b125d05 --- hif/src/dispatcher/multibus.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/hif/src/dispatcher/multibus.c b/hif/src/dispatcher/multibus.c index 8ca93da4901c..db427716c530 100644 --- a/hif/src/dispatcher/multibus.c +++ b/hif/src/dispatcher/multibus.c @@ -624,7 +624,7 @@ int hif_apps_grp_irqs_enable(struct hif_opaque_softc *hif_ctx) { struct hif_exec_context *hif_exec; struct hif_softc *scn; - int i; + int i, j; QDF_BUG(hif_ctx); scn = HIF_GET_SOFTC(hif_ctx); @@ -636,7 +636,9 @@ int hif_apps_grp_irqs_enable(struct hif_opaque_softc *hif_ctx) if (!hif_exec) continue; - hif_exec->irq_enable(hif_exec); + for (j = 0; j < hif_exec->numirq; j++) + pfrm_enable_irq(scn->qdf_dev->dev, + hif_exec->os_irq[j]); } return 0; @@ -646,7 +648,7 @@ int hif_apps_grp_irqs_disable(struct hif_opaque_softc *hif_ctx) { struct hif_exec_context *hif_exec; struct hif_softc *scn; - int i; + int i, j; QDF_BUG(hif_ctx); scn = HIF_GET_SOFTC(hif_ctx); @@ -658,7 +660,9 @@ int hif_apps_grp_irqs_disable(struct hif_opaque_softc *hif_ctx) if (!hif_exec) continue; - hif_exec->irq_disable(hif_exec); + for (j = 0; j < hif_exec->numirq; j++) + pfrm_disable_irq(scn->qdf_dev->dev, + hif_exec->os_irq[j]); } return 0;