@@ -98,7 +98,7 @@ static dma_addr_t otx2_dma_map_skb_frag(struct otx2_nic *pfvf,
offset = skb_frag_off(frag);
*len = skb_frag_size(frag);
}
- return otx2_dma_map_page(pfvf, page, offset, *len, DMA_TO_DEVICE);
+ return otx2_dma_map_page(pfvf, page, offset, *len, DMA_BIDIRECTIONAL);
}
static void otx2_dma_unmap_skb_frags(struct otx2_nic *pfvf, struct sg_list *sg)
@@ -107,7 +107,7 @@ static void otx2_dma_unmap_skb_frags(struct otx2_nic *pfvf, struct sg_list *sg)
for (seg = 0; seg < sg->num_segs; seg++) {
otx2_dma_unmap_page(pfvf, sg->dma_addr[seg],
- sg->size[seg], DMA_TO_DEVICE);
+ sg->size[seg], DMA_BIDIRECTIONAL);
}
sg->num_segs = 0;
}
Crypto hardware need write permission when doing inline in-place encrypt or decrypt operation on skb-data. So map this memory as device read-write. Signed-off-by: Bharat Bhushan <bbhushan2@marvell.com> --- drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)