]> git.baikalelectronics.ru Git - kernel.git/commit
IB/mlx5: When not in dual port RoCE mode, use provided port as native
authorMark Bloch <markb@mellanox.com>
Mon, 5 Mar 2018 18:09:47 +0000 (20:09 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Wed, 7 Mar 2018 03:08:38 +0000 (20:08 -0700)
commite66b090392e45b979003d7cd82e9fd436fdc7c35
treeb9369b5c1485f04320159585aadf68734a304dbc
parent5ec51f84151a71b2b854d60d43ccd1c1c842b4bb
IB/mlx5: When not in dual port RoCE mode, use provided port as native

The series that introduced dual port RoCE mode assumed that we don't have
a dual port HCA that use the mlx5 driver, this is not the case for
Connect-IB HCAs. This reasoning led to assigning 1 as the native port
index which causes issue when the second port is used.

For example query_pkey() when called on the second port will return values
of the first port. Make sure that we assign the right port index as the
native port index.

Fixes: f987878b5f6f ("{net, IB}/mlx5: Manage port association for multiport RoCE")
Reviewed-by: Daniel Jurgens <danielj@mellanox.com>
Signed-off-by: Mark Bloch <markb@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/mlx5/main.c