aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ipath/ipath_ud.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_ud.c')
-rw-r--r--drivers/infiniband/hw/ipath/ipath_ud.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_ud.c b/drivers/infiniband/hw/ipath/ipath_ud.c
index 6991d1d74e3c..49f1102af8b3 100644
--- a/drivers/infiniband/hw/ipath/ipath_ud.c
+++ b/drivers/infiniband/hw/ipath/ipath_ud.c
@@ -39,7 +39,6 @@
39static int init_sge(struct ipath_qp *qp, struct ipath_rwqe *wqe, 39static int init_sge(struct ipath_qp *qp, struct ipath_rwqe *wqe,
40 u32 *lengthp, struct ipath_sge_state *ss) 40 u32 *lengthp, struct ipath_sge_state *ss)
41{ 41{
42 struct ipath_ibdev *dev = to_idev(qp->ibqp.device);
43 int user = to_ipd(qp->ibqp.pd)->user; 42 int user = to_ipd(qp->ibqp.pd)->user;
44 int i, j, ret; 43 int i, j, ret;
45 struct ib_wc wc; 44 struct ib_wc wc;
@@ -50,8 +49,7 @@ static int init_sge(struct ipath_qp *qp, struct ipath_rwqe *wqe,
50 continue; 49 continue;
51 /* Check LKEY */ 50 /* Check LKEY */
52 if ((user && wqe->sg_list[i].lkey == 0) || 51 if ((user && wqe->sg_list[i].lkey == 0) ||
53 !ipath_lkey_ok(&dev->lk_table, 52 !ipath_lkey_ok(qp, j ? &ss->sg_list[j - 1] : &ss->sge,
54 j ? &ss->sg_list[j - 1] : &ss->sge,
55 &wqe->sg_list[i], IB_ACCESS_LOCAL_WRITE)) 53 &wqe->sg_list[i], IB_ACCESS_LOCAL_WRITE))
56 goto bad_lkey; 54 goto bad_lkey;
57 *lengthp += wqe->sg_list[i].length; 55 *lengthp += wqe->sg_list[i].length;
@@ -343,7 +341,7 @@ int ipath_post_ud_send(struct ipath_qp *qp, struct ib_send_wr *wr)
343 341
344 if (wr->sg_list[i].length == 0) 342 if (wr->sg_list[i].length == 0)
345 continue; 343 continue;
346 if (!ipath_lkey_ok(&dev->lk_table, ss.num_sge ? 344 if (!ipath_lkey_ok(qp, ss.num_sge ?
347 sg_list + ss.num_sge - 1 : &ss.sge, 345 sg_list + ss.num_sge - 1 : &ss.sge,
348 &wr->sg_list[i], 0)) { 346 &wr->sg_list[i], 0)) {
349 ret = -EINVAL; 347 ret = -EINVAL;