]>
Commit | Line | Data |
---|---|---|
59fa0e4e SL |
1 | From 66858e95f56b3551e9fff85010a84a9c8717f681 Mon Sep 17 00:00:00 2001 |
2 | From: Sasha Levin <sashal@kernel.org> | |
3 | Date: Tue, 7 Jul 2020 14:06:11 +0300 | |
4 | Subject: IB/mlx5: Fix 50G per lane indication | |
5 | ||
6 | From: Aya Levin <ayal@mellanox.com> | |
7 | ||
8 | [ Upstream commit 530c8632b547ff72f11ff83654b22462a73f1f7b ] | |
9 | ||
10 | Some released FW versions mistakenly don't set the capability that 50G per | |
11 | lane link-modes are supported for VFs (ptys_extended_ethernet capability | |
12 | bit). | |
13 | ||
14 | Use PTYS.ext_eth_proto_capability instead, as this indication is always | |
15 | accurate. If PTYS.ext_eth_proto_capability is valid | |
16 | (has a non-zero value) conclude that the HCA supports 50G per lane. | |
17 | ||
18 | Otherwise, conclude that the HCA doesn't support 50G per lane. | |
19 | ||
20 | Fixes: 08e8676f1607 ("IB/mlx5: Add support for 50Gbps per lane link modes") | |
21 | Link: https://lore.kernel.org/r/20200707110612.882962-3-leon@kernel.org | |
22 | Signed-off-by: Aya Levin <ayal@mellanox.com> | |
23 | Reviewed-by: Eran Ben Elisha <eranbe@mellanox.com> | |
24 | Reviewed-by: Saeed Mahameed <saeedm@mellanox.com> | |
25 | Signed-off-by: Leon Romanovsky <leonro@mellanox.com> | |
26 | Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> | |
27 | Signed-off-by: Sasha Levin <sashal@kernel.org> | |
28 | --- | |
29 | drivers/infiniband/hw/mlx5/main.c | 2 +- | |
30 | 1 file changed, 1 insertion(+), 1 deletion(-) | |
31 | ||
32 | diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c | |
33 | index 6679756506e60..820e407b3e260 100644 | |
34 | --- a/drivers/infiniband/hw/mlx5/main.c | |
35 | +++ b/drivers/infiniband/hw/mlx5/main.c | |
36 | @@ -515,7 +515,7 @@ static int mlx5_query_port_roce(struct ib_device *device, u8 port_num, | |
37 | mdev_port_num); | |
38 | if (err) | |
39 | goto out; | |
40 | - ext = MLX5_CAP_PCAM_FEATURE(dev->mdev, ptys_extended_ethernet); | |
41 | + ext = !!MLX5_GET_ETH_PROTO(ptys_reg, out, true, eth_proto_capability); | |
42 | eth_prot_oper = MLX5_GET_ETH_PROTO(ptys_reg, out, ext, eth_proto_oper); | |
43 | ||
44 | props->active_width = IB_WIDTH_4X; | |
45 | -- | |
46 | 2.25.1 | |
47 |