linux_dsm_epyc7002/drivers/infiniband/hw/mlx4
Mark Bloch ec78b3bd66 RDMA/mlx4: Read pkey table length instead of hardcoded value
If the pkey_table is not available (which is the case when RoCE is not
supported), the cited commit caused a regression where mlx4_devices
without RoCE are not created.

Fix this by returning a pkey table length of zero in procedure
eth_link_query_port() if the pkey-table length reported by the device is
zero.

Link: https://lore.kernel.org/r/20200824110229.1094376-1-leon@kernel.org
Cc: <stable@vger.kernel.org>
Fixes: 1901b91f99 ("IB/core: Fix potential NULL pointer dereference in pkey cache")
Fixes: fa417f7b52 ("IB/mlx4: Add support for IBoE")
Signed-off-by: Mark Bloch <markb@mellanox.com>
Reviewed-by: Maor Gottlieb <maorg@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
2020-08-27 09:17:05 -03:00
..
ah.c RDMA: Group create AH arguments in struct 2020-05-02 20:19:53 -03:00
alias_GUID.c timekeeping: Use proper clock specifier names in functions 2019-06-22 12:11:27 +02:00
cm.c IB/mlx4: Fix leak in id_map_find_del 2020-01-27 16:46:53 -04:00
cq.c Use ODP MRs for kernel ULPs 2020-01-21 09:55:04 -04:00
doorbell.c IB: Allow calls to ib_umem_get from kernel ULPs 2020-01-16 16:14:28 +02:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
mad.c RDMA: Change MAD processing function to remove extra casting and parameter 2019-11-12 20:20:15 -04:00
main.c RDMA/mlx4: Read pkey table length instead of hardcoded value 2020-08-27 09:17:05 -03:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
mcg.c IB/mlx4: Remove unnecessary parentheses 2018-09-21 12:00:50 -04:00
mlx4_ib.h RDMA: Remove the udata parameter from alloc_mr callback 2020-07-06 19:25:53 -03:00
mr.c IB/uverbs: Set IOVA on IB MR in uverbs layer 2020-07-06 19:50:33 -03:00
qp.c treewide: Remove uninitialized_var() usage 2020-07-16 12:35:15 -07:00
srq.c IB: Allow calls to ib_umem_get from kernel ULPs 2020-01-16 16:14:28 +02:00
sysfs.c mlx4: Use snprintf instead of complicated strcpy 2018-12-06 20:23:06 -07:00