RDMA/mlx5: Fix query RoCE port
authorMaor Gottlieb <maorg@nvidia.com>
Thu, 4 Mar 2021 12:45:15 +0000 (14:45 +0200)
committerJason Gunthorpe <jgg@nvidia.com>
Fri, 12 Mar 2021 00:12:39 +0000 (20:12 -0400)
commit7852546f524595245382a919e752468f73421451
tree50485cdbf1c3dbca4f78350c69ca5b6cd4bfab8c
parent14d05b552b5dbc75d664b8afe875114735673ffc
RDMA/mlx5: Fix query RoCE port

mlx5_is_roce_enabled returns the devlink RoCE init value, therefore it
should be used only when driver is loaded. Instead we just need to read
the roce_en field.

In addition, rename mlx5_is_roce_enabled to mlx5_is_roce_init_enabled.

Fixes: 7a58779edd75 ("IB/mlx5: Improve query port for representor port")
Link: https://lore.kernel.org/r/20210304124517.1100608-2-leon@kernel.org
Signed-off-by: Maor Gottlieb <maorg@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/mlx5/main.c
include/linux/mlx5/driver.h