Commit 6fa26208 authored by Saeed Mahameed's avatar Saeed Mahameed Committed by Doug Ledford

IB/mlx4: Fix port query for 56Gb Ethernet links

Report the correct speed in the port attributes when using a 56Gbps
ethernet link.  Without this change the field is incorrectly set to 10.

Fixes: a9c766bb ('IB/mlx4: Fix info returned when querying IBoE ports')
Fixes: 2e96691c ('IB: Use central enum for speed instead of hard-coded values')
Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
Signed-off-by: default avatarYishai Hadas <yishaih@mellanox.com>
Signed-off-by: default avatarDaniel Jurgens <danielj@mellanox.com>
Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 731e0415
...@@ -698,9 +698,11 @@ static int eth_link_query_port(struct ib_device *ibdev, u8 port, ...@@ -698,9 +698,11 @@ static int eth_link_query_port(struct ib_device *ibdev, u8 port,
if (err) if (err)
goto out; goto out;
props->active_width = (((u8 *)mailbox->buf)[5] == 0x40) ? props->active_width = (((u8 *)mailbox->buf)[5] == 0x40) ||
(((u8 *)mailbox->buf)[5] == 0x20 /*56Gb*/) ?
IB_WIDTH_4X : IB_WIDTH_1X; IB_WIDTH_4X : IB_WIDTH_1X;
props->active_speed = IB_SPEED_QDR; props->active_speed = (((u8 *)mailbox->buf)[5] == 0x20 /*56Gb*/) ?
IB_SPEED_FDR : IB_SPEED_QDR;
props->port_cap_flags = IB_PORT_CM_SUP | IB_PORT_IP_BASED_GIDS; props->port_cap_flags = IB_PORT_CM_SUP | IB_PORT_IP_BASED_GIDS;
props->gid_tbl_len = mdev->dev->caps.gid_table_len[port]; props->gid_tbl_len = mdev->dev->caps.gid_table_len[port];
props->max_msg_sz = mdev->dev->caps.max_msg_sz; props->max_msg_sz = mdev->dev->caps.max_msg_sz;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment