mlx5en: Verify port type is ethernet before creating network device
Else the mlx5en driver might attach to infiniband ports. Sponsored by: Mellanox Technologies MFC after: 1 week
This commit is contained in:
parent
431fe47416
commit
f5344e8333
@ -2654,6 +2654,9 @@ mlx5e_check_required_hca_cap(struct mlx5_core_dev *mdev)
|
||||
|
||||
/* TODO: add more must-to-have features */
|
||||
|
||||
if (MLX5_CAP_GEN(mdev, port_type) != MLX5_CAP_PORT_TYPE_ETH)
|
||||
return (-ENODEV);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user