Skip to content

Commit

Permalink
net/mlx5e: Separate dma base address and offset in dma_sync call
Browse files Browse the repository at this point in the history
Pass the base dma address and offset to dma_sync_single_range_for_cpu(),
instead of doing the pre-calculation.

Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
  • Loading branch information
Tariq Toukan authored and Saeed Mahameed committed Mar 28, 2018
1 parent 73faf36 commit bd658dd
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -870,10 +870,8 @@ struct sk_buff *skb_from_cqe(struct mlx5e_rq *rq, struct mlx5_cqe64 *cqe,
data = va + rx_headroom;
frag_size = MLX5_SKB_FRAG_SZ(rx_headroom + cqe_bcnt);

dma_sync_single_range_for_cpu(rq->pdev,
di->addr + wi->offset,
0, frag_size,
DMA_FROM_DEVICE);
dma_sync_single_range_for_cpu(rq->pdev, di->addr, wi->offset,
frag_size, DMA_FROM_DEVICE);
prefetch(data);
wi->offset += frag_size;

Expand Down

0 comments on commit bd658dd

Please sign in to comment.