summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/sw/rdmavt/qp.c
diff options
context:
space:
mode:
authorWolfram Sang <wsa@the-dreams.de>2019-02-14 17:46:56 +0100
committerWolfram Sang <wsa@the-dreams.de>2019-02-14 17:46:56 +0100
commit338618ad2a01b821a34e089a6607143fb283dee3 (patch)
treeadf9aff96a5a087c820251f3eb09928b3271b007 /drivers/infiniband/sw/rdmavt/qp.c
parenti2c: rcar: refactor TCYC handling (diff)
parentLinux 5.0-rc6 (diff)
downloadlinux-338618ad2a01b821a34e089a6607143fb283dee3.tar.xz
linux-338618ad2a01b821a34e089a6607143fb283dee3.zip
Merge branch 'i2c/for-current' into i2c/for-5.1
Diffstat (limited to 'drivers/infiniband/sw/rdmavt/qp.c')
-rw-r--r--drivers/infiniband/sw/rdmavt/qp.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/infiniband/sw/rdmavt/qp.c b/drivers/infiniband/sw/rdmavt/qp.c
index a1bd8cfc2c25..c6cc3e4ab71d 100644
--- a/drivers/infiniband/sw/rdmavt/qp.c
+++ b/drivers/infiniband/sw/rdmavt/qp.c
@@ -2910,6 +2910,8 @@ send:
goto op_err;
if (!ret)
goto rnr_nak;
+ if (wqe->length > qp->r_len)
+ goto inv_err;
break;
case IB_WR_RDMA_WRITE_WITH_IMM:
@@ -3078,7 +3080,10 @@ op_err:
goto err;
inv_err:
- send_status = IB_WC_REM_INV_REQ_ERR;
+ send_status =
+ sqp->ibqp.qp_type == IB_QPT_RC ?
+ IB_WC_REM_INV_REQ_ERR :
+ IB_WC_SUCCESS;
wc.status = IB_WC_LOC_QP_OP_ERR;
goto err;