qcacmn: Support multiple TX rings in DP interrupt handler
In dp_service_srngs, the current logic assumes that WBM2SWRELEASE ring number as obtained from interrupt_ctx->tx_mask matches the index of soc->tx_comp[] array. However this may not be true, esp for HMT. Add logic to fix the same. Use a separate macro to enable use of single TX ring. Change-Id: I1bee27b800ad4e4ab1a1fe5e2b01b5b43acfe1f7 CRs-Fixed: 2984362
This commit is contained in:

committed by
Madan Koyyalamudi

parent
3b08d50258
commit
c75f9cc178
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2016-2020 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -24,6 +24,10 @@
|
|||||||
#define TX_WMM_AC_NUM 4
|
#define TX_WMM_AC_NUM 4
|
||||||
#define ENABLE_DP_HIST_STATS
|
#define ENABLE_DP_HIST_STATS
|
||||||
#define DP_MEMORY_OPT
|
#define DP_MEMORY_OPT
|
||||||
|
#ifndef CONFIG_BERYLLIUM
|
||||||
|
#define DP_USE_SINGLE_TCL
|
||||||
|
#endif
|
||||||
|
|
||||||
#define DP_RX_DISABLE_NDI_MDNS_FORWARDING
|
#define DP_RX_DISABLE_NDI_MDNS_FORWARDING
|
||||||
|
|
||||||
#define OL_TXQ_PAUSE_REASON_FW (1 << 0)
|
#define OL_TXQ_PAUSE_REASON_FW (1 << 0)
|
||||||
|
@@ -2321,6 +2321,7 @@ static uint32_t dp_service_srngs(void *dp_ctx, uint32_t dp_budget)
|
|||||||
struct dp_intr_stats *intr_stats = &int_ctx->intr_stats;
|
struct dp_intr_stats *intr_stats = &int_ctx->intr_stats;
|
||||||
struct dp_soc *soc = int_ctx->soc;
|
struct dp_soc *soc = int_ctx->soc;
|
||||||
int ring = 0;
|
int ring = 0;
|
||||||
|
int index;
|
||||||
uint32_t work_done = 0;
|
uint32_t work_done = 0;
|
||||||
int budget = dp_budget;
|
int budget = dp_budget;
|
||||||
uint8_t tx_mask = int_ctx->tx_ring_mask;
|
uint8_t tx_mask = int_ctx->tx_ring_mask;
|
||||||
@@ -2338,28 +2339,25 @@ static uint32_t dp_service_srngs(void *dp_ctx, uint32_t dp_budget)
|
|||||||
int_ctx->rxdma2host_ring_mask);
|
int_ctx->rxdma2host_ring_mask);
|
||||||
|
|
||||||
/* Process Tx completion interrupts first to return back buffers */
|
/* Process Tx completion interrupts first to return back buffers */
|
||||||
while (tx_mask) {
|
for (index = 0; index < soc->num_tcl_data_rings; index++) {
|
||||||
if (tx_mask & 0x1) {
|
if (!((1 << wlan_cfg_get_wbm_ring_num_for_index(index)) &
|
||||||
work_done = dp_tx_comp_handler(int_ctx,
|
tx_mask))
|
||||||
soc,
|
continue;
|
||||||
soc->tx_comp_ring[ring].hal_srng,
|
work_done = dp_tx_comp_handler(int_ctx,
|
||||||
ring, remaining_quota);
|
soc,
|
||||||
|
soc->tx_comp_ring[index].hal_srng,
|
||||||
if (work_done) {
|
index, remaining_quota);
|
||||||
intr_stats->num_tx_ring_masks[ring]++;
|
if (work_done) {
|
||||||
dp_verbose_debug("tx mask 0x%x ring %d, budget %d, work_done %d",
|
intr_stats->num_tx_ring_masks[index]++;
|
||||||
tx_mask, ring, budget,
|
dp_verbose_debug("tx mask 0x%x index %d, budget %d, work_done %d",
|
||||||
work_done);
|
tx_mask, index, budget,
|
||||||
}
|
work_done);
|
||||||
|
|
||||||
budget -= work_done;
|
|
||||||
if (budget <= 0)
|
|
||||||
goto budget_done;
|
|
||||||
|
|
||||||
remaining_quota = budget;
|
|
||||||
}
|
}
|
||||||
tx_mask = tx_mask >> 1;
|
budget -= work_done;
|
||||||
ring++;
|
if (budget <= 0)
|
||||||
|
goto budget_done;
|
||||||
|
|
||||||
|
remaining_quota = budget;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Process REO Exception ring interrupt */
|
/* Process REO Exception ring interrupt */
|
||||||
|
@@ -1559,7 +1559,7 @@ int wlan_cfg_per_pdev_lmac_ring(struct wlan_cfg_dp_soc_ctxt *cfg)
|
|||||||
|
|
||||||
qdf_export_symbol(wlan_cfg_per_pdev_lmac_ring);
|
qdf_export_symbol(wlan_cfg_per_pdev_lmac_ring);
|
||||||
|
|
||||||
#ifdef DP_MEMORY_OPT
|
#if defined(DP_USE_SINGLE_TCL)
|
||||||
int wlan_cfg_num_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *cfg)
|
int wlan_cfg_num_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *cfg)
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
|
Reference in New Issue
Block a user