]> git.baikalelectronics.ru Git - kernel.git/commit
IB/mlx5: Fix 50G per lane indication
authorAya Levin <ayal@mellanox.com>
Tue, 7 Jul 2020 11:06:11 +0000 (14:06 +0300)
committerJason Gunthorpe <jgg@nvidia.com>
Wed, 8 Jul 2020 23:15:58 +0000 (20:15 -0300)
commitd119339d0293d6b9ed1f2a68731816f061aef45b
tree21f1bcce4745438e00b3e1a936d7fe0e3f322f50
parent966c5ce79f1dd8017e8934ef1b045c637d953c81
IB/mlx5: 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).

Use PTYS.ext_eth_proto_capability instead, as this indication is always
accurate. 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: 3f32b31f4668 ("IB/mlx5: Add support for 50Gbps per lane link modes")
Link: https://lore.kernel.org/r/20200707110612.882962-3-leon@kernel.org
Signed-off-by: Aya Levin <ayal@mellanox.com>
Reviewed-by: Eran Ben Elisha <eranbe@mellanox.com>
Reviewed-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/mlx5/main.c