IB/mlx5: Move ODP initialization to the corresponding stage
authorMark Bloch <markb@mellanox.com>
Mon, 1 Jan 2018 11:07:00 +0000 (13:07 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Thu, 4 Jan 2018 00:26:59 +0000 (17:26 -0700)
Now that we have a stage just for ODP, move all relevant
initialization logic into one place.

Signed-off-by: Mark Bloch <markb@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/mlx5/main.c

index 9a5de242b74de6af33463abe91cc6cfc09aca71c..07331613f4234d830ac9c15f58a96ed533e0231a 100644 (file)
@@ -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);
 }