Commit 8380b74e authored by Kamal Heib's avatar Kamal Heib Committed by Jason Gunthorpe

RDMA/providers: Fix return value from create_srq callbacks

The proper return code is "-EOPNOTSUPP" when the create_srq() callback
is not supported.
Signed-off-by: default avatarKamal Heib <kamalheib1@gmail.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent f95ccffc
...@@ -1397,7 +1397,7 @@ struct ib_srq *bnxt_re_create_srq(struct ib_pd *ib_pd, ...@@ -1397,7 +1397,7 @@ struct ib_srq *bnxt_re_create_srq(struct ib_pd *ib_pd,
} }
if (srq_init_attr->srq_type != IB_SRQT_BASIC) { if (srq_init_attr->srq_type != IB_SRQT_BASIC) {
rc = -ENOTSUPP; rc = -EOPNOTSUPP;
goto exit; goto exit;
} }
......
...@@ -449,7 +449,7 @@ static struct ib_srq *mthca_create_srq(struct ib_pd *pd, ...@@ -449,7 +449,7 @@ static struct ib_srq *mthca_create_srq(struct ib_pd *pd,
int err; int err;
if (init_attr->srq_type != IB_SRQT_BASIC) if (init_attr->srq_type != IB_SRQT_BASIC)
return ERR_PTR(-ENOSYS); return ERR_PTR(-EOPNOTSUPP);
srq = kmalloc(sizeof *srq, GFP_KERNEL); srq = kmalloc(sizeof *srq, GFP_KERNEL);
if (!srq) if (!srq)
......
...@@ -82,7 +82,7 @@ struct ib_srq *rvt_create_srq(struct ib_pd *ibpd, ...@@ -82,7 +82,7 @@ struct ib_srq *rvt_create_srq(struct ib_pd *ibpd,
struct ib_srq *ret; struct ib_srq *ret;
if (srq_init_attr->srq_type != IB_SRQT_BASIC) if (srq_init_attr->srq_type != IB_SRQT_BASIC)
return ERR_PTR(-ENOSYS); return ERR_PTR(-EOPNOTSUPP);
if (srq_init_attr->attr.max_sge == 0 || if (srq_init_attr->attr.max_sge == 0 ||
srq_init_attr->attr.max_sge > dev->dparms.props.max_srq_sge || srq_init_attr->attr.max_sge > dev->dparms.props.max_srq_sge ||
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment