diff --git a/dp/wifi3.0/dp_main.c b/dp/wifi3.0/dp_main.c index 8aedeaa4a9c2..9c77ca605dd6 100644 --- a/dp/wifi3.0/dp_main.c +++ b/dp/wifi3.0/dp_main.c @@ -6967,7 +6967,8 @@ dp_print_soc_tx_stats(struct dp_soc *soc) soc->stats.tx.tcl_ring_full[0], soc->stats.tx.tcl_ring_full[1], soc->stats.tx.tcl_ring_full[2]); - + DP_PRINT_STATS("Tx invalid completion release = %d", + soc->stats.tx.invalid_release_source); } /** * dp_print_soc_rx_stats: Print SOC level Rx stats diff --git a/dp/wifi3.0/dp_tx.c b/dp/wifi3.0/dp_tx.c index ce76d007f592..5b6c10272954 100644 --- a/dp/wifi3.0/dp_tx.c +++ b/dp/wifi3.0/dp_tx.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2015-2019 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -3372,9 +3372,11 @@ uint32_t dp_tx_comp_handler(struct dp_soc *soc, void *hal_srng, uint32_t quota) (buffer_src != HAL_TX_COMP_RELEASE_SOURCE_FW)) { QDF_TRACE(QDF_MODULE_ID_DP, - QDF_TRACE_LEVEL_FATAL, - "Tx comp release_src != TQM | FW"); - + QDF_TRACE_LEVEL_FATAL, + "Tx comp release_src != TQM | FW but from %d", + buffer_src); + hal_dump_comp_desc(tx_comp_hal_desc); + DP_STATS_INC(soc, tx.invalid_release_source, 1); qdf_assert_always(0); } diff --git a/dp/wifi3.0/dp_types.h b/dp/wifi3.0/dp_types.h index 81e1e8d1e488..1afb04998134 100644 --- a/dp/wifi3.0/dp_types.h +++ b/dp/wifi3.0/dp_types.h @@ -592,7 +592,8 @@ struct dp_soc_stats { uint32_t desc_in_use; /* tqm_release_reason == FW removed */ uint32_t dropped_fw_removed; - + /* tx completion release_src != TQM or FW */ + uint32_t invalid_release_source; } tx; /* SOC level RX stats */ diff --git a/hal/wifi3.0/hal_tx.h b/hal/wifi3.0/hal_tx.h index d9725d46fd2f..de730cc1c99d 100644 --- a/hal/wifi3.0/hal_tx.h +++ b/hal/wifi3.0/hal_tx.h @@ -817,6 +817,29 @@ static inline void hal_tx_comp_desc_sync(void *hw_desc, qdf_mem_copy(comp, hw_desc, HAL_TX_COMPLETION_DESC_LEN_BYTES); } +/** + * hal_dump_comp_desc() - dump tx completion descriptor + * @hal_desc: hardware descriptor pointer + * + * This function will print tx completion descriptor + * + * Return: none + */ +static inline void hal_dump_comp_desc(void *hw_desc) +{ + struct hal_tx_desc_comp_s *comp = + (struct hal_tx_desc_comp_s *)hw_desc; + uint32_t i; + + QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_FATAL, + "Current tx completion descriptor is"); + + for (i = 0; i < HAL_TX_COMPLETION_DESC_LEN_DWORDS; i++) { + QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_FATAL, + "DWORD[i] = 0x%x", comp->desc[i]); + } +} + /** * hal_tx_comp_get_htt_desc() - Read the HTT portion of WBM Descriptor * @hal_desc: Hardware (WBM) descriptor pointer