浏览代码

qcacmn: more debugging information about invaild TX release source

1) Add one counter to track the invaild TX release source
2) Capture he descriptor that caused the issue
3) Print the invalid release source

CRs-Fixed: 2380964
Change-Id: I0dc410ae2e7c9df58ef53e3f20ca7979d086659e
chenguo 6 年之前
父节点
当前提交
73c7b7c744
共有 4 个文件被更改,包括 33 次插入6 次删除
  1. 2 1
      dp/wifi3.0/dp_main.c
  2. 6 4
      dp/wifi3.0/dp_tx.c
  3. 2 1
      dp/wifi3.0/dp_types.h
  4. 23 0
      hal/wifi3.0/hal_tx.h

+ 2 - 1
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

+ 6 - 4
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);
 		}
 

+ 2 - 1
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 */

+ 23 - 0
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