diff options
author | Shannon Nelson <shannon.nelson@amd.com> | 2024-02-14 20:59:03 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2024-02-16 11:48:08 +0300 |
commit | d67ee210dafd0a3f3d65ed2d01027cd0e0de93d6 (patch) | |
tree | 2ba391f38c5a27676af4f334eaeeef2bb9c7d9bc /drivers | |
parent | 97538c146cca50dc6cd3d37b5ddcb43c6fc10a46 (diff) | |
download | linux-d67ee210dafd0a3f3d65ed2d01027cd0e0de93d6.tar.xz |
ionic: use dma range APIs
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>
Reviewed-by: Brett Creeley <brett.creeley@amd.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/pensando/ionic/ionic_txrx.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/net/ethernet/pensando/ionic/ionic_txrx.c b/drivers/net/ethernet/pensando/ionic/ionic_txrx.c index acc1343113c2..9865cad61649 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_txrx.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_txrx.c @@ -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); |