From 054e0b9b4f5b1313e1c47c2bc8f0106bfc50f1da Mon Sep 17 00:00:00 2001 From: Karthik Kantamneni Date: Mon, 20 Jul 2020 22:28:50 +0530 Subject: [PATCH] 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 --- core/dp/htt/htt.c | 5 +++++ core/dp/ol/inc/ol_htt_api.h | 10 +++++++++- core/dp/txrx/ol_txrx.c | 4 +++- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/core/dp/htt/htt.c b/core/dp/htt/htt.c index 566f189b8eae..b7a8ced03dc7 100644 --- a/core/dp/htt/htt.c +++ b/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) { diff --git a/core/dp/ol/inc/ol_htt_api.h b/core/dp/ol/inc/ol_htt_api.h index 73038c116331..8c5a419acbd7 100644 --- a/core/dp/ol/inc/ol_htt_api.h +++ b/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 diff --git a/core/dp/txrx/ol_txrx.c b/core/dp/txrx/ol_txrx.c index 1d52eecc3153..f6d83cf19e2c 100644 --- a/core/dp/txrx/ol_txrx.c +++ b/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); }