Parcourir la source

qcacld-3.0: Check refill debt count during rx data stall

When rx data stall happens due to ring refill failure
check for refill debt count.

CRS-Fixed: 2740233
Change-Id: Ib88074f0e7ed9a64b522a64ff669af87626ce1da
Karthik Kantamneni il y a 4 ans
Parent
commit
054e0b9b4f
3 fichiers modifiés avec 17 ajouts et 2 suppressions
  1. 5 0
      core/dp/htt/htt.c
  2. 9 1
      core/dp/ol/inc/ol_htt_api.h
  3. 3 1
      core/dp/txrx/ol_txrx.c

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

@@ -859,6 +859,11 @@ void htt_log_rx_ring_info(htt_pdev_handle pdev)
 		  qdf_atomic_read(&pdev->rx_ring.refill_debt));
 }
 
+void htt_rx_refill_failure(htt_pdev_handle pdev)
+{
+	QDF_BUG(qdf_atomic_read(&pdev->rx_ring.refill_debt));
+}
+
 #if HTT_DEBUG_LEVEL > 5
 void htt_display(htt_pdev_handle pdev, int indent)
 {

+ 9 - 1
core/dp/ol/inc/ol_htt_api.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2014-2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011, 2014-2019-2020 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
@@ -192,6 +192,14 @@ void htt_t2h_stats_print(uint8_t *stats_data, int concise);
  */
 void htt_log_rx_ring_info(htt_pdev_handle pdev);
 
+/**
+ * htt_rx_refill_failure() - During refill failure check if debt is zero
+ * @pdev: handle to the HTT instance
+ *
+ * Return: None
+ */
+void htt_rx_refill_failure(htt_pdev_handle pdev);
+
 #ifndef HTT_DEBUG_LEVEL
 #if defined(DEBUG)
 #define HTT_DEBUG_LEVEL 10

+ 3 - 1
core/dp/txrx/ol_txrx.c

@@ -5582,8 +5582,10 @@ static void ol_txrx_post_data_stall_event(
 	data_stall_info.recovery_type = recovery_type;
 
 	if (data_stall_info.data_stall_type ==
-				DATA_STALL_LOG_FW_RX_REFILL_FAILED)
+				DATA_STALL_LOG_FW_RX_REFILL_FAILED) {
 		htt_log_rx_ring_info(pdev->htt_pdev);
+		htt_rx_refill_failure(pdev->htt_pdev);
+	}
 
 	pdev->data_stall_detect_callback(&data_stall_info);
 }