From: Yishai Hadas The PCI core initialises every PCI device with a DMA segment boundary mask of 0xffffffff in pci_device_add(), which forbids any segment from crossing a 4GB-aligned address regardless of its length. The data direct device raises the default maximum segment size to 2GB but keeps that boundary, although it has no such limitation. Declare that explicitly, in line with mlx5_core, to avoid a mismatch between the declared constraints and the hardware capabilities. Signed-off-by: Yishai Hadas Reviewed-by: Moshe Shemesh Signed-off-by: Tariq Toukan --- drivers/net/ethernet/mellanox/mlx5/core/data_direct.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/data_direct.c b/drivers/net/ethernet/mellanox/mlx5/core/data_direct.c index 5afb11a2a9f0..73eef8bbc327 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/data_direct.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/data_direct.c @@ -103,6 +103,7 @@ static int mlx5_data_direct_set_dma_caps(struct pci_dev *pdev) } dma_set_max_seg_size(&pdev->dev, SZ_2G); + dma_set_seg_boundary(&pdev->dev, ULONG_MAX); return 0; } -- 2.44.0