Author: hselasky Date: Fri Sep 16 11:53:53 2016 New Revision: 305875 URL: https://svnweb.freebsd.org/changeset/base/305875
Log: 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 Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Fri Sep 16 11:51:31 2016 (r305874) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Fri Sep 16 11:53:53 2016 (r305875) @@ -2654,6 +2654,9 @@ mlx5e_check_required_hca_cap(struct mlx5 /* TODO: add more must-to-have features */ + if (MLX5_CAP_GEN(mdev, port_type) != MLX5_CAP_PORT_TYPE_ETH) + return (-ENODEV); + return (0); } _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"