File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
drivers/infiniband/hw/mlx5 Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -3639,7 +3639,8 @@ static int mlx5_ib_init_multiport_master(struct mlx5_ib_dev *dev)
3639
3639
list_for_each_entry (mpi , & mlx5_ib_unaffiliated_port_list ,
3640
3640
list ) {
3641
3641
if (dev -> sys_image_guid == mpi -> sys_image_guid &&
3642
- (mlx5_core_native_port_num (mpi -> mdev ) - 1 ) == i ) {
3642
+ (mlx5_core_native_port_num (mpi -> mdev ) - 1 ) == i &&
3643
+ mlx5_core_same_coredev_type (dev -> mdev , mpi -> mdev )) {
3643
3644
bound = mlx5_ib_bind_slave_port (dev , mpi );
3644
3645
}
3645
3646
@@ -4785,7 +4786,8 @@ static int mlx5r_mp_probe(struct auxiliary_device *adev,
4785
4786
4786
4787
mutex_lock (& mlx5_ib_multiport_mutex );
4787
4788
list_for_each_entry (dev , & mlx5_ib_dev_list , ib_dev_list ) {
4788
- if (dev -> sys_image_guid == mpi -> sys_image_guid )
4789
+ if (dev -> sys_image_guid == mpi -> sys_image_guid &&
4790
+ mlx5_core_same_coredev_type (dev -> mdev , mpi -> mdev ))
4789
4791
bound = mlx5_ib_bind_slave_port (dev , mpi );
4790
4792
4791
4793
if (bound ) {
Original file line number Diff line number Diff line change @@ -1202,6 +1202,12 @@ static inline bool mlx5_core_is_vf(const struct mlx5_core_dev *dev)
1202
1202
return dev -> coredev_type == MLX5_COREDEV_VF ;
1203
1203
}
1204
1204
1205
+ static inline bool mlx5_core_same_coredev_type (const struct mlx5_core_dev * dev1 ,
1206
+ const struct mlx5_core_dev * dev2 )
1207
+ {
1208
+ return dev1 -> coredev_type == dev2 -> coredev_type ;
1209
+ }
1210
+
1205
1211
static inline bool mlx5_core_is_ecpf (const struct mlx5_core_dev * dev )
1206
1212
{
1207
1213
return dev -> caps .embedded_cpu ;
You can’t perform that action at this time.
0 commit comments