aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mlx4
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@nvidia.com>2020-09-17 15:12:22 -0300
committerJason Gunthorpe <jgg@nvidia.com>2020-09-18 10:31:45 -0300
commit5dee5872f87552cfb173c899d35fc1413c2aa77f (patch)
tree273a8551247785dbec22d1e7c55e2b636e1c9e8e /drivers/infiniband/hw/mlx4
parentRDMA: Convert RWQ table logic to ib_core allocation scheme (diff)
parentRDMA: Fix link active_speed size (diff)
downloadlinux-dev-5dee5872f87552cfb173c899d35fc1413c2aa77f.tar.xz
linux-dev-5dee5872f87552cfb173c899d35fc1413c2aa77f.zip
Merge branch 'mlx5_active_speed' into rdma.git for-next
Leon Romanovsky says: ==================== IBTA declares speed as 16 bits, but kernel stores it in u8. This series fixes in-kernel declaration while keeping external interface intact. ==================== Based on the mlx5-next branch at git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux due to dependencies. * branch 'mlx5_active_speed': RDMA: Fix link active_speed size RDMA/mlx5: Delete duplicated mlx5_ptys_width enum net/mlx5: Refactor query port speed functions
Diffstat (limited to 'drivers/infiniband/hw/mlx4')
-rw-r--r--drivers/infiniband/hw/mlx4/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c
index 9d278100e7eb..753c70402498 100644
--- a/drivers/infiniband/hw/mlx4/main.c
+++ b/drivers/infiniband/hw/mlx4/main.c
@@ -784,7 +784,8 @@ static int eth_link_query_port(struct ib_device *ibdev, u8 port,
props->ip_gids = true;
props->gid_tbl_len = mdev->dev->caps.gid_table_len[port];
props->max_msg_sz = mdev->dev->caps.max_msg_sz;
- props->pkey_tbl_len = 1;
+ if (mdev->dev->caps.pkey_table_len[port])
+ props->pkey_tbl_len = 1;
props->max_mtu = IB_MTU_4096;
props->max_vl_num = 2;
props->state = IB_PORT_DOWN;