diff --git a/core/dp/htt/htt.c b/core/dp/htt/htt.c index 4664a42fcbea..5962f24152c5 100644 --- a/core/dp/htt/htt.c +++ b/core/dp/htt/htt.c @@ -663,13 +663,15 @@ void htt_display(htt_pdev_handle pdev, int indent) qdf_print("%*srx ring: space for %d elems, filled with %d buffers\n", indent + 4, " ", pdev->rx_ring.size, pdev->rx_ring.fill_level); - qdf_print("%*sat %p (%#x paddr)\n", indent + 8, " ", - pdev->rx_ring.buf.paddrs_ring, pdev->rx_ring.base_paddr); + qdf_print("%*sat %p (%llx paddr)\n", indent + 8, " ", + pdev->rx_ring.buf.paddrs_ring, + (unsigned long long)pdev->rx_ring.base_paddr); qdf_print("%*snetbuf ring @ %p\n", indent + 8, " ", pdev->rx_ring.buf.netbufs_ring); - qdf_print("%*sFW_IDX shadow register: vaddr = %p, paddr = %#x\n", + qdf_print("%*sFW_IDX shadow register: vaddr = %p, paddr = %llx\n", indent + 8, " ", - pdev->rx_ring.alloc_idx.vaddr, pdev->rx_ring.alloc_idx.paddr); + pdev->rx_ring.alloc_idx.vaddr, + (unsigned long long)pdev->rx_ring.alloc_idx.paddr); qdf_print("%*sSW enqueue idx= %d, SW dequeue idx: desc= %d, buf= %d\n", indent + 8, " ", *pdev->rx_ring.alloc_idx.vaddr, pdev->rx_ring.sw_rd_idx.msdu_desc, diff --git a/core/dp/htt/htt_h2t.c b/core/dp/htt/htt_h2t.c index b9bff6cf8cff..6c9ec2bb9a92 100644 --- a/core/dp/htt/htt_h2t.c +++ b/core/dp/htt/htt_h2t.c @@ -355,8 +355,20 @@ QDF_STATUS htt_h2t_rx_ring_cfg_msg_ll(struct htt_pdev_t *pdev) #if HTT_PADDR64 HTT_RX_RING_CFG_BASE_PADDR_LO_SET(*msg_word, pdev->rx_ring.base_paddr); - msg_word++; - HTT_RX_RING_CFG_BASE_PADDR_HI_SET(*msg_word, 0); + { + uint32_t tmp; + + tmp = (pdev->rx_ring.base_paddr >> 32); + if (tmp & 0xfffffe0) { + qdf_print("%s:%d paddr > 37 bits!. Trimmed.", + __func__, __LINE__); + tmp &= 0x01f; + } + + + msg_word++; + HTT_RX_RING_CFG_BASE_PADDR_HI_SET(*msg_word, tmp); + } #else /* ! HTT_PADDR64 */ HTT_RX_RING_CFG_BASE_PADDR_SET(*msg_word, pdev->rx_ring.base_paddr); #endif /* HTT_PADDR64 */ diff --git a/core/dp/htt/htt_rx.c b/core/dp/htt/htt_rx.c index 161b27505a68..62820e0e8720 100644 --- a/core/dp/htt/htt_rx.c +++ b/core/dp/htt/htt_rx.c @@ -976,8 +976,8 @@ void htt_rx_print_rx_indication(qdf_nbuf_t rx_ind_msg, htt_pdev_handle pdev) qdf_print ("------------------HTT RX IND-----------------------------\n"); - qdf_print("alloc idx paddr %x (*vaddr) %d\n", - pdev->rx_ring.alloc_idx.paddr, + qdf_print("alloc idx paddr %llx (*vaddr) %d\n", + (unsigned long long)pdev->rx_ring.alloc_idx.paddr, *pdev->rx_ring.alloc_idx.vaddr); qdf_print("sw_rd_idx msdu_payld %d msdu_desc %d\n", diff --git a/core/dp/htt/htt_types.h b/core/dp/htt/htt_types.h index 65c4777f59c2..9c67355e74a1 100644 --- a/core/dp/htt/htt_types.h +++ b/core/dp/htt/htt_types.h @@ -291,9 +291,9 @@ struct htt_pdev_t { * Base address of ring, as a "physical" device address rather * than a CPU address. */ - uint32_t base_paddr; - int size; /* how many elems in the ring (power of 2) */ - unsigned size_mask; /* size - 1 */ + qdf_dma_addr_t base_paddr; + int32_t size; /* how many elems in the ring (power of 2) */ + uint32_t size_mask; /* size - 1, at least 16 bits long */ int fill_level; /* how many rx buffers to keep in the ring */ int fill_cnt; /* # of rx buffers (full+empty) in the ring */ @@ -308,7 +308,7 @@ struct htt_pdev_t { */ struct { uint32_t *vaddr; - uint32_t paddr; + qdf_dma_addr_t paddr; qdf_dma_mem_context(memctx); } target_idx; @@ -324,7 +324,7 @@ struct htt_pdev_t { */ struct { uint32_t *vaddr; - uint32_t paddr; + qdf_dma_addr_t paddr; qdf_dma_mem_context(memctx); } alloc_idx;