Skip to content

Commit 3687b45

Browse files
Kalesh APrleon
Kalesh AP
authored andcommitted
RDMA/bnxt_re: Return error for SRQ resize
SRQ resize is not supported in the driver. But driver is not returning error from bnxt_re_modify_srq() for SRQ resize. Fixes: 37cb11a ("RDMA/bnxt_re: Add SRQ support for Broadcom adapters") Signed-off-by: Kalesh AP <[email protected]> Signed-off-by: Selvin Xavier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Leon Romanovsky <[email protected]>
1 parent 8eaca6b commit 3687b45

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/infiniband/hw/bnxt_re/ib_verbs.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1827,7 +1827,7 @@ int bnxt_re_modify_srq(struct ib_srq *ib_srq, struct ib_srq_attr *srq_attr,
18271827
switch (srq_attr_mask) {
18281828
case IB_SRQ_MAX_WR:
18291829
/* SRQ resize is not supported */
1830-
break;
1830+
return -EINVAL;
18311831
case IB_SRQ_LIMIT:
18321832
/* Change the SRQ threshold */
18331833
if (srq_attr->srq_limit > srq->qplib_srq.max_wqe)
@@ -1842,13 +1842,12 @@ int bnxt_re_modify_srq(struct ib_srq *ib_srq, struct ib_srq_attr *srq_attr,
18421842
/* On success, update the shadow */
18431843
srq->srq_limit = srq_attr->srq_limit;
18441844
/* No need to Build and send response back to udata */
1845-
break;
1845+
return 0;
18461846
default:
18471847
ibdev_err(&rdev->ibdev,
18481848
"Unsupported srq_attr_mask 0x%x", srq_attr_mask);
18491849
return -EINVAL;
18501850
}
1851-
return 0;
18521851
}
18531852

18541853
int bnxt_re_query_srq(struct ib_srq *ib_srq, struct ib_srq_attr *srq_attr)

0 commit comments

Comments
 (0)