From: Mark Bloch Date: Mon, 1 Jan 2018 11:07:00 +0000 (+0200) Subject: IB/mlx5: Move ODP initialization to the corresponding stage X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=07321b3c674bc2f4d1e47431e38365af523fe34f;p=openwrt%2Fstaging%2Fblogic.git IB/mlx5: Move ODP initialization to the corresponding stage Now that we have a stage just for ODP, move all relevant initialization logic into one place. Signed-off-by: Mark Bloch Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe --- diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c index 9a5de242b74d..07331613f423 100644 --- a/drivers/infiniband/hw/mlx5/main.c +++ b/drivers/infiniband/hw/mlx5/main.c @@ -4170,8 +4170,6 @@ static int mlx5_ib_stage_caps_init(struct mlx5_ib_dev *dev) dev->ib_dev.disassociate_ucontext = mlx5_ib_disassociate_ucontext; - mlx5_ib_internal_fill_odp_caps(dev); - dev->umr_fence = mlx5_get_umr_fence(MLX5_CAP_GEN(mdev, umr_fence)); if (MLX5_CAP_GEN(mdev, imaicl)) { @@ -4272,6 +4270,8 @@ static void mlx5_ib_stage_dev_res_cleanup(struct mlx5_ib_dev *dev) static int mlx5_ib_stage_odp_init(struct mlx5_ib_dev *dev) { + mlx5_ib_internal_fill_odp_caps(dev); + return mlx5_ib_odp_init_one(dev); }