qcacmn: Assign DMA address correctly to all scatterlist elements
Assign DMA address correctly to all scatterlist elements of scatter gather table in qdf_mem_shared_mem_alloc() func. Change-Id: I07988d0bc35e3e0fcf7b9f6df02a9e56a0e8b083 CRS-Fixed: 2110715
This commit is contained in:

committato da
nshrivas

parent
989c563fb0
commit
d0f08ef155
@@ -458,7 +458,7 @@ static inline qdf_dma_addr_t qdf_mem_paddr_from_dmaaddr(qdf_device_t osdev,
|
||||
}
|
||||
|
||||
/**
|
||||
* qdf_os_mem_dma_get_sgtable() - Returns DMA memory scatter gather table
|
||||
* qdf_mem_dma_get_sgtable() - Returns DMA memory scatter gather table
|
||||
* @dev: device instace
|
||||
* @sgt: scatter gather table pointer
|
||||
* @cpu_addr: HLOS virtual address
|
||||
@@ -474,6 +474,18 @@ qdf_mem_dma_get_sgtable(struct device *dev, void *sgt, void *cpu_addr,
|
||||
return __qdf_os_mem_dma_get_sgtable(dev, sgt, cpu_addr, dma_addr, size);
|
||||
}
|
||||
|
||||
/**
|
||||
* qdf_dma_get_sgtable_dma_addr() - Assigns DMA address to scatterlist elements
|
||||
* @sgt: scatter gather table pointer
|
||||
*
|
||||
* @Return: None
|
||||
*/
|
||||
static inline void
|
||||
qdf_dma_get_sgtable_dma_addr(struct sg_table *sgt)
|
||||
{
|
||||
__qdf_dma_get_sgtable_dma_addr(sgt);
|
||||
}
|
||||
|
||||
/**
|
||||
* qdf_mem_get_dma_addr() - Return dma address based on SMMU translation status.
|
||||
* @osdev: Parent device instance
|
||||
@@ -616,8 +628,7 @@ static inline qdf_shared_mem_t *qdf_mem_shared_mem_alloc(qdf_device_t osdev,
|
||||
qdf_mem_get_dma_size(osdev,
|
||||
&shared_mem->mem_info));
|
||||
|
||||
shared_mem->sgtable.sgl->dma_address =
|
||||
qdf_mem_get_dma_pa(osdev, &shared_mem->mem_info);
|
||||
qdf_dma_get_sgtable_dma_addr(&shared_mem->sgtable);
|
||||
|
||||
return shared_mem;
|
||||
}
|
||||
|
Fai riferimento in un nuovo problema
Block a user