diff options
author | Junxian Huang <huangjunxian6@hisilicon.com> | 2023-11-14 15:34:47 +0300 |
---|---|---|
committer | Leon Romanovsky <leon@kernel.org> | 2023-11-19 15:55:43 +0300 |
commit | f45b83ad39f8033e717b1eee57e81811113d5a84 (patch) | |
tree | 049ff4c044ab3ef8ad48ae956c1b406c0c73ad90 /drivers/infiniband/hw/hns/hns_roce_hw_v2.c | |
parent | 79844118d6c1cd48bd2cfacbab67592e6bf32fe8 (diff) | |
download | linux-f45b83ad39f8033e717b1eee57e81811113d5a84.tar.xz |
RDMA/hns: Fix inappropriate err code for unsupported operations
EOPNOTSUPP is more situable than EINVAL for allocating XRCD while XRC
is not supported and unsupported resizing SRQ.
Fixes: 32548870d438 ("RDMA/hns: Add support for XRC on HIP09")
Fixes: 221109e64316 ("RDMA/hns: Add interception for resizing SRQs")
Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com>
Link: https://lore.kernel.org/r/20231114123449.1106162-2-huangjunxian6@hisilicon.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'drivers/infiniband/hw/hns/hns_roce_hw_v2.c')
-rw-r--r-- | drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c index 0cd2612a4987..c01307be06ab 100644 --- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c +++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c @@ -5666,7 +5666,7 @@ static int hns_roce_v2_modify_srq(struct ib_srq *ibsrq, /* Resizing SRQs is not supported yet */ if (srq_attr_mask & IB_SRQ_MAX_WR) - return -EINVAL; + return -EOPNOTSUPP; if (srq_attr_mask & IB_SRQ_LIMIT) { if (srq_attr->srq_limit > srq->wqe_cnt) |