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)
commit6a1cf4e443a3b0a4d690d3c93b84b1e9cbfcb1bd
tree2b13ac17f67d3ba5f482ce085a1ea86be34fa6b6
parentf4aebbfb56ed0c186adbeb2799df836da50f78e3
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: a08b4ed1373d ("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