From 45fa11262a7d768e7853111edf7897aff196e288 Mon Sep 17 00:00:00 2001 From: Yeshwanth Sriram Guntuka Date: Wed, 26 May 2021 17:33:44 +0530 Subject: [PATCH] qcacmn: Disable MSI intr config for CE5 on Lithium targets FW is not setting up any context for CE5 but host is still configuring the dest and status ring for CE5. This can result in CE5 HW to write to MSI iova address when PCIe is in low power state. Fix is to disable MSI intr configuration for CE5 on Lithium based targets. Change-Id: I964305ad1258d41d7afe6422f87286904c0a6739 CRs-Fixed: 2954723 --- hif/src/ce/ce_assignment.h | 9 ++++++--- hif/src/ce/ce_service_srng.c | 3 +-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/hif/src/ce/ce_assignment.h b/hif/src/ce/ce_assignment.h index a9e873ade6..8957cb5e13 100644 --- a/hif/src/ce/ce_assignment.h +++ b/hif/src/ce/ce_assignment.h @@ -1229,7 +1229,8 @@ static struct CE_attr host_ce_config_wlan_qca6390[] = { #ifdef REMOVE_PKT_LOG { /* CE5 */ 0, 0, 0, 0, 0, NULL,}, #else - { /* CE5 */ CE_ATTR_FLAGS, 0, 0, 2048, 512, NULL,}, + { /* CE5 */ (CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0, 0, 2048, 512, + NULL,}, #endif /* Target autonomous HIF_memcpy */ { /* CE6 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,}, @@ -1283,7 +1284,8 @@ static struct CE_attr host_ce_config_wlan_qca6490[] = { { /* CE4 */ CE4_COMP_HTT_HTC, 0, CE_HTT_H2T_MSG_SRC_NENTRIES_QCA6490, 256, 0, NULL,}, /* target -> host PKTLOG */ - { /* CE5 */ CE_ATTR_FLAGS, 0, 0, 2048, 512, NULL,}, + { /* CE5 */ (CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0, 0, 2048, 512, + NULL,}, /* Target autonomous HIF_memcpy */ { /* CE6 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,}, /* ce_diag, the Diagnostic Window */ @@ -1332,7 +1334,8 @@ static struct CE_attr host_ce_config_wlan_qca6750[] = { { /* CE4 */ (CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0, CE_HTT_H2T_MSG_SRC_NENTRIES, 256, 0, NULL,}, /* target -> host PKTLOG */ - { /* CE5 */ CE_ATTR_FLAGS, 0, 0, 2048, 512, NULL,}, + { /* CE5 */ (CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0, 0, 2048, 512, + NULL,}, /* Target autonomous HIF_memcpy */ { /* CE6 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,}, #ifdef WLAN_FEATURE_WMI_DIAG_OVER_CE7 diff --git a/hif/src/ce/ce_service_srng.c b/hif/src/ce/ce_service_srng.c index 8a9147fe15..2531e3e1e2 100644 --- a/hif/src/ce/ce_service_srng.c +++ b/hif/src/ce/ce_service_srng.c @@ -872,13 +872,12 @@ static void ce_srng_status_ring_setup(struct hif_softc *scn, uint32_t ce_id, hif_debug("ce_id: %d", ce_id); - ce_srng_msi_ring_params_setup(scn, ce_id, &ring_params); - ring_params.ring_base_paddr = status_ring->base_addr_CE_space; ring_params.ring_base_vaddr = status_ring->base_addr_owner_space; ring_params.num_entries = status_ring->nentries; if (!(CE_ATTR_DISABLE_INTR & attr->flags)) { + ce_srng_msi_ring_params_setup(scn, ce_id, &ring_params); ce_status_ring_config_int_threshold(scn, &ring_params); }