|
24 | 24 | #include <linux/mlx5/vport.h> |
25 | 25 | #include <linux/mlx5/fs.h> |
26 | 26 | #include <linux/mlx5/eswitch.h> |
| 27 | +#include <linux/mlx5/driver.h> |
27 | 28 | #include <linux/list.h> |
28 | 29 | #include <rdma/ib_smi.h> |
29 | 30 | #include <rdma/ib_umem_odp.h> |
@@ -3175,6 +3176,13 @@ static void mlx5_ib_unbind_slave_port(struct mlx5_ib_dev *ibdev, |
3175 | 3176 |
|
3176 | 3177 | lockdep_assert_held(&mlx5_ib_multiport_mutex); |
3177 | 3178 |
|
| 3179 | + mlx5_core_mp_event_replay(ibdev->mdev, |
| 3180 | + MLX5_DRIVER_EVENT_AFFILIATION_REMOVED, |
| 3181 | + NULL); |
| 3182 | + mlx5_core_mp_event_replay(mpi->mdev, |
| 3183 | + MLX5_DRIVER_EVENT_AFFILIATION_REMOVED, |
| 3184 | + NULL); |
| 3185 | + |
3178 | 3186 | mlx5_ib_cleanup_cong_debugfs(ibdev, port_num); |
3179 | 3187 |
|
3180 | 3188 | spin_lock(&port->mp.mpi_lock); |
@@ -3226,6 +3234,7 @@ static bool mlx5_ib_bind_slave_port(struct mlx5_ib_dev *ibdev, |
3226 | 3234 | struct mlx5_ib_multiport_info *mpi) |
3227 | 3235 | { |
3228 | 3236 | u32 port_num = mlx5_core_native_port_num(mpi->mdev) - 1; |
| 3237 | + u64 key; |
3229 | 3238 | int err; |
3230 | 3239 |
|
3231 | 3240 | lockdep_assert_held(&mlx5_ib_multiport_mutex); |
@@ -3254,6 +3263,14 @@ static bool mlx5_ib_bind_slave_port(struct mlx5_ib_dev *ibdev, |
3254 | 3263 |
|
3255 | 3264 | mlx5_ib_init_cong_debugfs(ibdev, port_num); |
3256 | 3265 |
|
| 3266 | + key = ibdev->ib_dev.index; |
| 3267 | + mlx5_core_mp_event_replay(mpi->mdev, |
| 3268 | + MLX5_DRIVER_EVENT_AFFILIATION_DONE, |
| 3269 | + &key); |
| 3270 | + mlx5_core_mp_event_replay(ibdev->mdev, |
| 3271 | + MLX5_DRIVER_EVENT_AFFILIATION_DONE, |
| 3272 | + &key); |
| 3273 | + |
3257 | 3274 | return true; |
3258 | 3275 |
|
3259 | 3276 | unbind: |
|
0 commit comments