OSDN Git Service

RDMA/mlx5: Disable IB_DEVICE_MEM_MGT_EXTENSIONS if IB_WR_REG_MR can't work
authorJason Gunthorpe <jgg@nvidia.com>
Mon, 14 Sep 2020 11:26:52 +0000 (14:26 +0300)
committerJason Gunthorpe <jgg@nvidia.com>
Fri, 18 Sep 2020 16:02:43 +0000 (13:02 -0300)
commit0ec52f0194638e2d284ad55eba5a7aff753de1b9
treefe36dafc068556ad7572d46bb9c0d05d50a1f6f1
parent5eb29f0d13a66502b91954597270003c90fb66c5
RDMA/mlx5: Disable IB_DEVICE_MEM_MGT_EXTENSIONS if IB_WR_REG_MR can't work

set_reg_wr() always fails if !umr_modify_entity_size_disabled because
mlx5_ib_can_use_umr() always fails. Without set_reg_wr() IB_WR_REG_MR
doesn't work and that means the device should not advertise
IB_DEVICE_MEM_MGT_EXTENSIONS.

Fixes: 841b07f99a47 ("IB/mlx5: Block MR WR if UMR is not possible")
Link: https://lore.kernel.org/r/20200914112653.345244-5-leon@kernel.org
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/mlx5/main.c