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

Commit cf1c5e1f authored by Eli Cohen's avatar Eli Cohen Committed by Roland Dreier
Browse files

IB/mlx5: Fix page shift in create CQ for userspace



When creating a CQ, we must use mlx5 adapter page shift.

Signed-off-by: default avatarEli Cohen <eli@mellanox.com>
Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
parent 79d3da9c
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -556,7 +556,7 @@ static int create_cq_user(struct mlx5_ib_dev *dev, struct ib_udata *udata,
		goto err_db;
		goto err_db;
	}
	}
	mlx5_ib_populate_pas(dev, cq->buf.umem, page_shift, (*cqb)->pas, 0);
	mlx5_ib_populate_pas(dev, cq->buf.umem, page_shift, (*cqb)->pas, 0);
	(*cqb)->ctx.log_pg_sz = page_shift - PAGE_SHIFT;
	(*cqb)->ctx.log_pg_sz = page_shift - MLX5_ADAPTER_PAGE_SHIFT;


	*index = to_mucontext(context)->uuari.uars[0].index;
	*index = to_mucontext(context)->uuari.uars[0].index;