diff options
author | Leon Romanovsky <leonro@mellanox.com> | 2018-03-13 15:29:25 +0200 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2018-03-15 10:59:58 -0400 |
commit | ea30f013765865f50fbfb6460aea2b18df19c978 (patch) | |
tree | a7d3b296ccad1b0595fe874210b73cbde0396565 | |
parent | 4289861d88d6c7b5e4c8cc7fe2ad6cdf0cdfc366 (diff) |
RDMA/mlx5: Return proper value for not-supported command
Return -EOPNOTSUPP value to the user for unsupported reg_user_mr.
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
-rw-r--r-- | drivers/infiniband/hw/mlx5/mr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mlx5/mr.c b/drivers/infiniband/hw/mlx5/mr.c index c7a8ece05bd2..9a8018cd320a 100644 --- a/drivers/infiniband/hw/mlx5/mr.c +++ b/drivers/infiniband/hw/mlx5/mr.c @@ -1220,7 +1220,7 @@ struct ib_mr *mlx5_ib_reg_user_mr(struct ib_pd *pd, u64 start, u64 length, bool use_umr = true; if (!IS_ENABLED(CONFIG_INFINIBAND_USER_MEM)) - return ERR_PTR(-EINVAL); + return ERR_PTR(-EOPNOTSUPP); mlx5_ib_dbg(dev, "start 0x%llx, virt_addr 0x%llx, length 0x%llx, access_flags 0x%x\n", start, virt_addr, length, access_flags); |