From b30b9176a28fa6b49e8a7a6b177cae9cf5d0f692 Mon Sep 17 00:00:00 2001 From: Surabhi Vishnoi Date: Fri, 5 Jul 2019 12:24:13 +0530 Subject: [PATCH] qcacmn: Add target ce configs based on pktlog feature for Adrastea When pktlog feature is disabled then the target CE11 attributes should be set to CE_ATTR_DISABLE_INTR. Currently, the target ce configs are attached unconditionally. This leads to incorrect attribute set for CE11 in case when pktlog feature is disabled and thereby abortion of HWDTIM in target as target checks host_ie for CE11. Currently host_ie is not set for CE11, this results in aborting of suspend mode as target assumes that host is using CE11. To mitigate this issue, attach the target ce configs based on pktlog feature. When pktlog feature is disabled then set the host_ie for CE11 which will indicate to target that host is not using CE11 and target will not abort HWDTIM mode. Change-Id: I331d3bd8eda0c2aba9d86fb7601ac2b74c9e2c31 CRs-Fixed: 2459887 --- hif/src/ce/ce_assignment.h | 33 +++++++++++++++++++++++++++++++++ hif/src/ce/ce_main.c | 15 ++++++++++----- 2 files changed, 43 insertions(+), 5 deletions(-) diff --git a/hif/src/ce/ce_assignment.h b/hif/src/ce/ce_assignment.h index 52cf3a978105..c5d824e46eba 100644 --- a/hif/src/ce/ce_assignment.h +++ b/hif/src/ce/ce_assignment.h @@ -842,6 +842,39 @@ static struct CE_attr host_ce_config_wlan_adrastea[] = { { /* CE11 */ CE_ATTR_FLAGS, 0, 0, 2048, 512, NULL,}, }; +static struct CE_pipe_config + target_lowdesc_ce_config_wlan_adrastea_nopktlog[] = { + /* host->target HTC control and raw streams */ + { /* CE0 */ 0, PIPEDIR_OUT, 32, 2048, CE_ATTR_FLAGS, 0,}, + /* target->host HTT */ + { /* CE1 */ 1, PIPEDIR_IN, 32, 2048, CE_ATTR_FLAGS, 0,}, + /* target->host WMI + HTC control */ + { /* CE2 */ 2, PIPEDIR_IN, 64, 2048, CE_ATTR_FLAGS, 0,}, + /* host->target WMI */ + { /* CE3 */ 3, PIPEDIR_OUT, 32, 2048, CE_ATTR_FLAGS, 0,}, + /* host->target HTT */ + { /* CE4 */ 4, PIPEDIR_OUT, 256, 256, + (CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0,}, + /* NB: 50% of src nentries, since tx has 2 frags */ + /* ipa_uc->target */ + { /* CE5 */ 5, PIPEDIR_OUT, 1024, 64, + (CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0,}, + /* Reserved for target autonomous HIF_memcpy */ + { /* CE6 */ 6, PIPEDIR_INOUT, 32, 16384, CE_ATTR_FLAGS, 0,}, + /* CE7 used only by Host */ + { /* CE7 */ 7, PIPEDIR_INOUT_H2H, 0, 0, + (CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0,}, + /* CE8 used only by IPA */ + { /* CE8 */ 8, PIPEDIR_IN, 32, 2048, CE_ATTR_FLAGS, 0,}, + /* CE9 target->host HTT */ + { /* CE9 */ 9, PIPEDIR_IN, 32, 2048, CE_ATTR_FLAGS, 0,}, + /* CE10 target->host HTT */ + { /* CE10 */ 10, PIPEDIR_IN, 32, 2048, CE_ATTR_FLAGS, 0,}, + /* Target -> host PKTLOG */ + { /* CE11 */ 11, PIPEDIR_IN, 32, 2048, + (CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0,}, +}; + static struct CE_pipe_config target_ce_config_wlan_adrastea[] = { /* host->target HTC control and raw streams */ { /* CE0 */ 0, PIPEDIR_OUT, 32, 2048, CE_ATTR_FLAGS, 0,}, diff --git a/hif/src/ce/ce_main.c b/hif/src/ce/ce_main.c index bc65ea587117..4e71316f18a3 100644 --- a/hif/src/ce/ce_main.c +++ b/hif/src/ce/ce_main.c @@ -3132,16 +3132,21 @@ void hif_ce_prepare_config(struct hif_softc *scn) scn->ce_count = QCA_6390_CE_COUNT; break; case TARGET_TYPE_ADRASTEA: - if (hif_is_attribute_set(scn, HIF_LOWDESC_CE_NO_PKTLOG_CFG)) + if (hif_is_attribute_set(scn, HIF_LOWDESC_CE_NO_PKTLOG_CFG)) { hif_state->host_ce_config = host_lowdesc_ce_config_wlan_adrastea_nopktlog; - else + hif_state->target_ce_config = + target_lowdesc_ce_config_wlan_adrastea_nopktlog; + hif_state->target_ce_config_sz = + sizeof(target_lowdesc_ce_config_wlan_adrastea_nopktlog); + } else { hif_state->host_ce_config = host_ce_config_wlan_adrastea; - - hif_state->target_ce_config = target_ce_config_wlan_adrastea; - hif_state->target_ce_config_sz = + hif_state->target_ce_config = + target_ce_config_wlan_adrastea; + hif_state->target_ce_config_sz = sizeof(target_ce_config_wlan_adrastea); + } break; }