From 4aba278b4dd79e1ccda39ffe7efc49806f395d39 Mon Sep 17 00:00:00 2001 From: Radha Krishna Simha Jiguru Date: Thu, 28 May 2020 21:01:29 +0530 Subject: [PATCH] qcacmn: Set IRQ_DISABLE_UNLAZY flag for DP interrupts on QCN9000 Since DP interrupts are not disabled at source, and enabled and disabled only at GIC level, set IRQ_DISABLE_UNLAZY flag to avoid spurious interrupt detection and avoid interrupt affinity failures. Change-Id: Ie98d8cba6f93bccd4d508a28bebc216d2b74fe1f --- hif/src/hif_main.h | 2 ++ hif/src/pcie/if_pci.c | 11 ++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/hif/src/hif_main.h b/hif/src/hif_main.h index c582df212bc6..bd6afae57f0f 100644 --- a/hif/src/hif_main.h +++ b/hif/src/hif_main.h @@ -250,6 +250,8 @@ struct hif_softc { /* The CPU hotplug event registration handle */ struct qdf_cpuhp_handler *cpuhp_event_handle; #endif + uint32_t irq_unlazy_disable; + /* Should the unlzay support for interrupt delivery be disabled */ }; static inline diff --git a/hif/src/pcie/if_pci.c b/hif/src/pcie/if_pci.c index 5745ccd06c6b..4fa06fccfdab 100644 --- a/hif/src/pcie/if_pci.c +++ b/hif/src/pcie/if_pci.c @@ -2586,6 +2586,8 @@ static void hif_pci_deconfigure_grp_irq(struct hif_softc *scn) hif_ext_group->irq_requested = false; for (j = 0; j < hif_ext_group->numirq; j++) { irq = hif_ext_group->os_irq[j]; + if (scn->irq_unlazy_disable) + irq_clear_status_flags(irq, IRQ_DISABLE_UNLAZY); pfrm_free_irq(scn->qdf_dev->dev, irq, hif_ext_group); } @@ -3785,7 +3787,8 @@ int hif_pci_configure_grp_irq(struct hif_softc *scn, pci_slot = hif_get_pci_slot(scn); for (j = 0; j < hif_ext_group->numirq; j++) { irq = hif_ext_group->irq[j]; - + if (scn->irq_unlazy_disable) + irq_set_status_flags(irq, IRQ_DISABLE_UNLAZY); hif_info("request_irq = %d for grp %d", irq, hif_ext_group->grp_id); ret = pfrm_request_irq( @@ -4100,6 +4103,12 @@ again: tgt_info->target_type = target_type; + /* + * Disable unlzay interrupt registration for QCN9000 + */ + if (target_type == TARGET_TYPE_QCN9000) + ol_sc->irq_unlazy_disable = 1; + if (ce_srng_based(ol_sc)) { HIF_TRACE("%s:Skip tgt_wake up for srng devices\n", __func__); } else {