staging: fsl-dpaa2/eth: Fix DMA mapping direction
We are using DMA_FROM_DEVICE when mapping RX frame buffers,
but DMA_BIDIRECTIONAL for unmap. Fix the direction for DMA
unmapping operation.
Fixes: 87eb55e418
("staging: fsl-dpaa2/eth: Fix potential endless loop")
Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
7a7a7e0ec4
commit
466bcdc1fa
@ -767,7 +767,7 @@ static void free_bufs(struct dpaa2_eth_priv *priv, u64 *buf_array, int count)
|
||||
for (i = 0; i < count; i++) {
|
||||
vaddr = dpaa2_iova_to_virt(priv->iommu_domain, buf_array[i]);
|
||||
dma_unmap_single(dev, buf_array[i], DPAA2_ETH_RX_BUF_SIZE,
|
||||
DMA_BIDIRECTIONAL);
|
||||
DMA_FROM_DEVICE);
|
||||
skb_free_frag(vaddr);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user