diff options
| author | Manjunathappa Prakash <prakashpm@codeaurora.org> | 2016-06-03 19:32:27 -0700 |
|---|---|---|
| committer | Vishwajith Upendra <vishwaji@codeaurora.org> | 2016-06-14 14:28:02 -0700 |
| commit | c8e756412e94362a159aefa454c4860f9d4a01bf (patch) | |
| tree | b5ddceafb60e35b4f73948a0f2122f35cddb912c | |
| parent | 92db771024cafff47000539f9fa7f8fb14fa3ae4 (diff) | |
qcacld-3.0: Enable DEBUG_Rx_RING_BUFFER to keep track of posted buffers
This enables the tracking of posted rx ring buffers. With this we can
identify if host/fw is wrong when we hit below issue:
"wlan: [0:E :QDF] rx hash: htt_rx_hash_list_lookup: no entry found for"
<physical address>
Change-Id: Ib973a2e2a69e881beddea23cdc1d2d994eeb1e12
CRs-Fixed: 864569
| -rwxr-xr-x | Kbuild | 1 | ||||
| -rw-r--r-- | core/dp/htt/htt_internal.h | 34 |
2 files changed, 20 insertions, 15 deletions
@@ -1120,6 +1120,7 @@ endif ifneq ($(TARGET_BUILD_VARIANT),user) CDEFINES += -DDESC_DUP_DETECT_DEBUG +CDEFINES += -DDEBUG_RX_RING_BUFFER endif ifeq ($(PANIC_ON_BUG),1) diff --git a/core/dp/htt/htt_internal.h b/core/dp/htt/htt_internal.h index 271e77eec211..da26fb641201 100644 --- a/core/dp/htt/htt_internal.h +++ b/core/dp/htt/htt_internal.h @@ -125,14 +125,20 @@ struct htt_host_rx_desc_base { (HTT_RX_STD_DESC_RESERVATION >> 2) #define HTT_RX_DESC_ALIGN_MASK 7 /* 8-byte alignment */ + #ifdef DEBUG_RX_RING_BUFFER +#define NBUF_MAP_ID(skb) \ + (((struct qdf_nbuf_cb *)((skb)->cb))->u.rx.map_index) + #define HTT_RX_RING_BUFF_DBG_LIST 1024 struct rx_buf_debug { - uint32_t paddr; - void *vaddr; + qdf_dma_addr_t paddr; + qdf_nbuf_t nbuf; + void *nbuf_data; bool in_use; }; #endif + static inline struct htt_host_rx_desc_base *htt_rx_desc(qdf_nbuf_t msdu) { return (struct htt_host_rx_desc_base *) @@ -531,6 +537,7 @@ static inline int htt_rx_ipa_uc_detach(struct htt_pdev_t *pdev) return 0; } #endif /* IPA_OFFLOAD */ + #ifdef DEBUG_RX_RING_BUFFER /** * htt_rx_dbg_rxbuf_init() - init debug rx buff list @@ -549,6 +556,7 @@ void htt_rx_dbg_rxbuf_init(struct htt_pdev_t *pdev) QDF_ASSERT(0); } } + /** * htt_rx_dbg_rxbuf_set() - set element of rx buff list * @pdev: pdev handle @@ -558,23 +566,22 @@ void htt_rx_dbg_rxbuf_init(struct htt_pdev_t *pdev) * Return: none */ static inline -void htt_rx_dbg_rxbuf_set(struct htt_pdev_t *pdev, - uint32_t paddr, - qdf_nbuf_t rx_netbuf) +void htt_rx_dbg_rxbuf_set(struct htt_pdev_t *pdev, qdf_dma_addr_t paddr, + qdf_nbuf_t rx_netbuf) { if (pdev->rx_buff_list) { - pdev->rx_buff_list[pdev->rx_buff_index].paddr = - paddr; - pdev->rx_buff_list[pdev->rx_buff_index].in_use = - true; - pdev->rx_buff_list[pdev->rx_buff_index].vaddr = - rx_netbuf; + pdev->rx_buff_list[pdev->rx_buff_index].paddr = paddr; + pdev->rx_buff_list[pdev->rx_buff_index].in_use = true; + pdev->rx_buff_list[pdev->rx_buff_index].nbuf_data = + rx_netbuf->data; + pdev->rx_buff_list[pdev->rx_buff_index].nbuf = rx_netbuf; NBUF_MAP_ID(rx_netbuf) = pdev->rx_buff_index; if (++pdev->rx_buff_index == HTT_RX_RING_BUFF_DBG_LIST) pdev->rx_buff_index = 0; } } + /** * htt_rx_dbg_rxbuf_set() - reset element of rx buff list * @pdev: pdev handle @@ -590,10 +597,7 @@ void htt_rx_dbg_rxbuf_reset(struct htt_pdev_t *pdev, if (pdev->rx_buff_list) { index = NBUF_MAP_ID(netbuf); if (index < HTT_RX_RING_BUFF_DBG_LIST) { - pdev->rx_buff_list[index].in_use = - false; - pdev->rx_buff_list[index].paddr = 0; - pdev->rx_buff_list[index].vaddr = NULL; + pdev->rx_buff_list[index].in_use = false; } } } |
