@@ -225,9 +225,8 @@ static struct sk_buff *ionic_rx_frags(struct ionic_queue *q,
frag_len = min_t(u16, len, ionic_rx_buf_size(buf_info));
len -= frag_len;
- dma_sync_single_for_cpu(dev,
- ionic_rx_buf_pa(buf_info),
- frag_len, DMA_FROM_DEVICE);
+ dma_sync_single_range_for_cpu(dev, ionic_rx_buf_pa(buf_info),
+ 0, frag_len, DMA_FROM_DEVICE);
skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags,
buf_info->page, buf_info->page_offset, frag_len,
@@ -276,11 +275,11 @@ static struct sk_buff *ionic_rx_copybreak(struct ionic_queue *q,
return NULL;
}
- dma_sync_single_for_cpu(dev, ionic_rx_buf_pa(buf_info),
- len, DMA_FROM_DEVICE);
+ dma_sync_single_range_for_cpu(dev, ionic_rx_buf_pa(buf_info),
+ 0, len, DMA_FROM_DEVICE);
skb_copy_to_linear_data(skb, ionic_rx_buf_va(buf_info), len);
- dma_sync_single_for_device(dev, ionic_rx_buf_pa(buf_info),
- len, DMA_FROM_DEVICE);
+ dma_sync_single_range_for_device(dev, ionic_rx_buf_pa(buf_info),
+ 0, len, DMA_FROM_DEVICE);
skb_put(skb, len);
skb->protocol = eth_type_trans(skb, q->lif->netdev);
Convert Rx datapath handling to use the DMA range APIs in preparation for adding XDP handling. Signed-off-by: Shannon Nelson <shannon.nelson@amd.com> --- drivers/net/ethernet/pensando/ionic/ionic_txrx.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-)