Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e4fc8560 authored by FUJITA Tomonori's avatar FUJITA Tomonori Committed by David S. Miller
Browse files

mlx4: replace the dma_sync_single_range_for_cpu/device API



There are only two users of the dma_sync_single_range_for_cpu/device
API in mainline (mlx4 and ssb). The
dma_sync_single_range_for_cpu/device API has never been documented and
the dma_sync_single_for_cpu/device API also support a partial sync.

This converts mlx4 to use the dma_sync_single_for_cpu/device API
(preparations for the removal of the dma_sync_single_range_for_cpu/device API).

Signed-off-by: default avatarFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6e03718c
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -508,11 +508,11 @@ static struct sk_buff *mlx4_en_rx_skb(struct mlx4_en_priv *priv,
		/* We are copying all relevant data to the skb - temporarily
		/* We are copying all relevant data to the skb - temporarily
		 * synch buffers for the copy */
		 * synch buffers for the copy */
		dma = be64_to_cpu(rx_desc->data[0].addr);
		dma = be64_to_cpu(rx_desc->data[0].addr);
		dma_sync_single_range_for_cpu(&mdev->pdev->dev, dma, 0,
		dma_sync_single_for_cpu(&mdev->pdev->dev, dma, length,
					      length, DMA_FROM_DEVICE);
					DMA_FROM_DEVICE);
		skb_copy_to_linear_data(skb, va, length);
		skb_copy_to_linear_data(skb, va, length);
		dma_sync_single_range_for_device(&mdev->pdev->dev, dma, 0,
		dma_sync_single_for_device(&mdev->pdev->dev, dma, length,
						 length, DMA_FROM_DEVICE);
					   DMA_FROM_DEVICE);
		skb->tail += length;
		skb->tail += length;
	} else {
	} else {