RDMA/mlx5: Assign profile before calling stages

Assign the profile to the IB device before executing stages. This will
allow to check which profile is being used from within a stage.

Link: https://lore.kernel.org/r/20200506071602.7177-2-leon@kernel.org
Signed-off-by: Mark Bloch <markb@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
This commit is contained in:
Mark Bloch
2020-05-06 10:16:01 +03:00
committed by Jason Gunthorpe
parent 029e88fd1e
commit 8d93efb8c5
2 changed files with 3 additions and 2 deletions

View File

@@ -7160,6 +7160,8 @@ void *__mlx5_ib_add(struct mlx5_ib_dev *dev,
int err;
int i;
dev->profile = profile;
for (i = 0; i < MLX5_IB_STAGE_MAX; i++) {
if (profile->stage[i].init) {
err = profile->stage[i].init(dev);
@@ -7168,7 +7170,6 @@ void *__mlx5_ib_add(struct mlx5_ib_dev *dev,
}
}
dev->profile = profile;
dev->ib_active = true;
return dev;