From b991ddfe99d210ec9d5e2cf71f3a41a1990a55d6 Mon Sep 17 00:00:00 2001 From: Chaoli Zhou Date: Wed, 15 Jan 2020 15:55:16 +0800 Subject: [PATCH] qcacld-3.0: Change dma address size to 8 bytes for Genoa IPA Currently, sizeof(qdf_dma_addr_t) is 4 bytes, but IPA driver and WLAN FW always use 8 bytes, we should follow up with them, otherwise, the numbers of rx complete ring entries will not be same in both sides. Meanwhile, for tx complete ring, during the first time initialization, we fill the buffer address with 4 bytes, while GSI FW read 8 bytes address content from tx complete ring, which should cause the GSI FW get invalid address on the half way and cause the smmu fault issue. So fill 8 bytes length buffer address to the tx complete ring can avoid such issue. Change-Id: I61021627b634d4b1525727cc944ee410ed3154db --- core/dp/htt/htt_rx.c | 4 ++-- core/dp/htt/htt_tx.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/dp/htt/htt_rx.c b/core/dp/htt/htt_rx.c index efc583d100a6..81ab225a020c 100644 --- a/core/dp/htt/htt_rx.c +++ b/core/dp/htt/htt_rx.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-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 @@ -269,7 +269,7 @@ static int htt_rx_ipa_uc_alloc_wdi2_rsc(struct htt_pdev_t *pdev, pdev->ipa_uc_rx_rsc.rx2_ind_ring = qdf_mem_shared_mem_alloc(pdev->osdev, rx_ind_ring_elements * - sizeof(qdf_dma_addr_t)); + sizeof(target_paddr_t)); if (!pdev->ipa_uc_rx_rsc.rx2_ind_ring) { QDF_TRACE(QDF_MODULE_ID_HTT, QDF_TRACE_LEVEL_ERROR, "%s: Unable to allocate memory for IPA rx2 ind ring", diff --git a/core/dp/htt/htt_tx.c b/core/dp/htt/htt_tx.c index 658a47f480fb..8a9a711c8a69 100644 --- a/core/dp/htt/htt_tx.c +++ b/core/dp/htt/htt_tx.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2014-2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2011, 2014-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 @@ -1097,12 +1097,12 @@ static int htt_tx_ipa_uc_wdi_tx_buf_alloc(struct htt_pdev_t *pdev, unsigned int tx_buffer_count_pwr2; qdf_dma_addr_t buffer_paddr; uint32_t *header_ptr; - qdf_dma_addr_t *ring_vaddr; + target_paddr_t *ring_vaddr; uint16_t idx; qdf_mem_info_t *mem_map_table = NULL, *mem_info = NULL; qdf_shared_mem_t *shared_tx_buffer; - ring_vaddr = (qdf_dma_addr_t *)pdev->ipa_uc_tx_rsc.tx_comp_ring->vaddr; + ring_vaddr = (target_paddr_t *)pdev->ipa_uc_tx_rsc.tx_comp_ring->vaddr; if (qdf_mem_smmu_s1_enabled(pdev->osdev)) { mem_map_table = qdf_mem_map_table_alloc(uc_tx_buf_cnt); if (!mem_map_table) {