forked from mirrors/linux
		
	net/mlx5e: Separate dma base address and offset in dma_sync call
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>
This commit is contained in:
		
							parent
							
								
									73faf36c5a
								
							
						
					
					
						commit
						bd658dda42
					
				
					 1 changed files with 2 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -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;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue