]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/mlx5: Use the proper number of ports
authorMark Bloch <mbloch@nvidia.com>
Mon, 8 Aug 2022 07:48:06 +0000 (10:48 +0300)
committerLeon Romanovsky <leonro@nvidia.com>
Tue, 16 Aug 2022 13:14:19 +0000 (16:14 +0300)
commitff56afdc33f98e62dffafc8c0f7e1abe10de78e7
tree963948e47a0cebcbae5bfb1ff51a029db3fea243
parent837f68f85c704ec28ea5616c2b8721a3b2a3db4e
RDMA/mlx5: Use the proper number of ports

The cited commit allowed the driver to operate over HCAs that have
4 physical ports. Use the number of ports of the RDMA device in the for
loop instead of using the struct size.

Fixes: 9e08c6393d21 ("net/mlx5: Support devices with more than 2 ports")
Link: https://lore.kernel.org/r/a54a56c2ede16044a29d119209b35189c662ac72.1659944855.git.leonro@nvidia.com
Signed-off-by: Mark Bloch <mbloch@nvidia.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/hw/mlx5/main.c