]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Fix 50G per lane indication
authorAya Levin <ayal@mellanox.com>
Mon, 15 Jun 2020 09:48:47 +0000 (12:48 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Fri, 10 Jul 2020 02:27:06 +0000 (19:27 -0700)
commit790bd7144db83b7741e72c4e5f13d13a53b20098
tree2b13ac17f67d3ba5f482ce085a1ea86be34fa6b6
parent99e4521aa02223c0e3c2e4552d7fe3d8ac4082b7
net/mlx5e: Fix 50G per lane indication

Some released FW versions mistakenly don't set the capability that 50G
per lane link-modes are supported for VFs (ptys_extended_ethernet
capability bit). When the capability is unset, read
PTYS.ext_eth_proto_capability (always reliable).
If PTYS.ext_eth_proto_capability is valid (has a non-zero value)
conclude that the HCA supports 50G per lane. Otherwise, conclude that
the HCA doesn't support 50G per lane.

Fixes: 2ea9a63120b5 ("net/mlx5: Add support to ext_* fields introduced in Port Type and Speed register")
Signed-off-by: Aya Levin <ayal@mellanox.com>
Reviewed-by: Eran Ben Elisha <eranbe@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en/port.c
drivers/net/ethernet/mellanox/mlx5/core/en/port.h
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c