Преглед на файлове

qcacld-3.0: Add debug logs for FW_RX_REFILL failure

Add debug logs to capture htt rx_ring info during data stall
detection for FW_RX_REFILL failure reason.

Change-Id: I6733a37677ebccfef5096ac38858c4505e8665b6
CRs-Fixed: 2121686
Poddar, Siddarth преди 7 години
родител
ревизия
b904759184
променени са 3 файла, в които са добавени 27 реда и са изтрити 0 реда
  1. 15 0
      core/dp/htt/htt.c
  2. 8 0
      core/dp/ol/inc/ol_htt_api.h
  3. 4 0
      core/dp/txrx/ol_txrx.c

+ 15 - 0
core/dp/htt/htt.c

@@ -779,6 +779,21 @@ int htt_htc_attach(struct htt_pdev_t *pdev, uint16_t service_id)
 	return 0;               /* success */
 }
 
+void htt_log_rx_ring_info(htt_pdev_handle pdev)
+{
+	if (!pdev) {
+		QDF_TRACE(QDF_MODULE_ID_HTT, QDF_TRACE_LEVEL_ERROR,
+			  "%s: htt pdev is NULL", __func__);
+		return;
+	}
+	QDF_TRACE(QDF_MODULE_ID_HTT, QDF_TRACE_LEVEL_DEBUG,
+		  "%s: Data Stall Detected with reason 4 (=FW_RX_REFILL_FAILED)."
+		  "src htt rx ring:  space for %d elements, filled with %d buffers, buffers in the ring %d, refill debt %d",
+		  __func__, pdev->rx_ring.size, pdev->rx_ring.fill_level,
+		  pdev->rx_ring.fill_cnt,
+		  qdf_atomic_read(&pdev->rx_ring.refill_debt));
+}
+
 #if HTT_DEBUG_LEVEL > 5
 void htt_display(htt_pdev_handle pdev, int indent)
 {

+ 8 - 0
core/dp/ol/inc/ol_htt_api.h

@@ -196,6 +196,14 @@ htt_t2h_dbg_stats_hdr_parse(uint8_t *stats_info_list,
  */
 void htt_t2h_stats_print(uint8_t *stats_data, int concise);
 
+/**
+ * htt_log_rx_ring_info() - log htt rx ring info during FW_RX_REFILL failure
+ * @pdev: handle to the HTT instance
+ *
+ * Return: None
+ */
+void htt_log_rx_ring_info(htt_pdev_handle pdev);
+
 #ifndef HTT_DEBUG_LEVEL
 #if defined(DEBUG)
 #define HTT_DEBUG_LEVEL 10

+ 4 - 0
core/dp/txrx/ol_txrx.c

@@ -5190,6 +5190,10 @@ static void ol_txrx_post_data_stall_event(
 	data_stall_info->pdev_id = pdev_id;
 	data_stall_info->recovery_type = recovery_type;
 
+	if (data_stall_info->data_stall_type ==
+				DATA_STALL_LOG_FW_RX_REFILL_FAILED)
+		htt_log_rx_ring_info(pdev->htt_pdev);
+
 	sys_build_message_header(SYS_MSG_ID_DATA_STALL_MSG, &msg);
 	/* Save callback and data */
 	msg.callback = pdev->data_stall_detect_callback;