qcacmn: Fix IPA SMMU mapping issue for RX buffers from refill pool

Refill pool buffer IPA mapping is done during allocation time,
but in some cases where IPA pipes enable/disable happens in between
previous mapping is not valid which is causing SMMU fault from IPA module.

Fix this by moving IPA mapping before replenishing buffers to RXDMA ring.

Change-Id: Ie6c5eb791b6f832f311a6e89489aebef37094d8f
CRS-Fixed: 2901819
This commit is contained in:
Karthik Kantamneni 2021-03-22 11:09:24 +05:30 • committed by Gerrit - the friendly Code Review server
commit 883d041de6

View file

@ -166,9 +166,6 @@ void dp_rx_refill_buff_pool_enqueue(struct dp_soc *soc)
continue;
}
dp_ipa_handle_rx_buf_smmu_mapping(soc, nbuf,
rx_desc_pool->buf_size,
true);
DP_RX_LIST_APPEND(nbuf_head, nbuf_tail, nbuf);
count++;
}
@ -271,13 +268,13 @@ dp_rx_buffer_pool_nbuf_map(struct dp_soc *soc,
if (qdf_unlikely(QDF_IS_STATUS_ERROR(ret)))
return ret;
dp_ipa_handle_rx_buf_smmu_mapping(soc,
(qdf_nbuf_t)((nbuf_frag_info_t->virt_addr).nbuf),
rx_desc_pool->buf_size,
true);
}
dp_ipa_handle_rx_buf_smmu_mapping(soc,
(qdf_nbuf_t)((nbuf_frag_info_t->virt_addr).nbuf),
rx_desc_pool->buf_size,
true);
return ret;
}
@ -316,9 +313,6 @@ static void dp_rx_refill_buff_pool_init(struct dp_soc *soc, u8 mac_id)
continue;
}
dp_ipa_handle_rx_buf_smmu_mapping(soc, nbuf,
rx_desc_pool->buf_size,
true);
DP_RX_LIST_APPEND(buff_pool->buf_head,
buff_pool->buf_tail, nbuf);
buff_pool->bufq_len++;
@ -380,9 +374,6 @@ static void dp_rx_refill_buff_pool_deinit(struct dp_soc *soc, u8 mac_id)
buff_pool->in_rx_refill_lock = true;
while ((nbuf = dp_rx_refill_buff_pool_dequeue_nbuf(soc))) {
dp_ipa_handle_rx_buf_smmu_mapping(soc, nbuf,
rx_desc_pool->buf_size,
false);
qdf_nbuf_unmap_nbytes_single(soc->osdev, nbuf,
QDF_DMA_BIDIRECTIONAL,
rx_desc_pool->buf_size);