RDMA/mlx5: Change the key being sent for MPV device affiliation
[platform/kernel/linux-starfive.git] / drivers / infiniband / hw / mlx5 / main.c
index 4c4233b..102ead4 100644 (file)
@@ -3263,7 +3263,7 @@ static bool mlx5_ib_bind_slave_port(struct mlx5_ib_dev *ibdev,
 
        mlx5_ib_init_cong_debugfs(ibdev, port_num);
 
-       key = ibdev->ib_dev.index;
+       key = mpi->mdev->priv.adev_idx;
        mlx5_core_mp_event_replay(mpi->mdev,
                                  MLX5_DRIVER_EVENT_AFFILIATION_DONE,
                                  &key);