aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
diff options
context:
space:
mode:
authorNaresh Gottumukkala <bgottumukkala@emulex.com>2013-08-26 05:57:43 -0400
committerRoland Dreier <roland@purestorage.com>2013-09-03 00:17:56 -0400
commit2b51a9b9eb6bf240d2592e10d2f8823dd1f5ee3e (patch)
tree69d44d3214f7243f05951ff9dd26302f83b258de /drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
parentf11220ee69f72cf08479f28fd494264ac6a9349b (diff)
RDMA/ocrdma: FRMA code cleanup
1) Fixed setting FR_MR bit for FRWR stag allocation 2) Access rights are passsed during FRWR stage and not during STAT allocation stage 3) FRWR WQE structure cleanup 4) Add QP level signaled bit. Signed-off-by: Naresh Gottumukkala <bgottumukkala@emulex.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/hw/ocrdma/ocrdma_verbs.c')
-rw-r--r--drivers/infiniband/hw/ocrdma/ocrdma_verbs.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
index 9e1d8c6bde52..3e80f65f42a3 100644
--- a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
+++ b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
@@ -82,7 +82,8 @@ int ocrdma_query_device(struct ib_device *ibdev, struct ib_device_attr *attr)
82 IB_DEVICE_RC_RNR_NAK_GEN | 82 IB_DEVICE_RC_RNR_NAK_GEN |
83 IB_DEVICE_SHUTDOWN_PORT | 83 IB_DEVICE_SHUTDOWN_PORT |
84 IB_DEVICE_SYS_IMAGE_GUID | 84 IB_DEVICE_SYS_IMAGE_GUID |
85 IB_DEVICE_LOCAL_DMA_LKEY; 85 IB_DEVICE_LOCAL_DMA_LKEY |
86 IB_DEVICE_MEM_MGT_EXTENSIONS;
86 attr->max_sge = min(dev->attr.max_send_sge, dev->attr.max_srq_sge); 87 attr->max_sge = min(dev->attr.max_send_sge, dev->attr.max_srq_sge);
87 attr->max_sge_rd = dev->attr.max_rdma_sge; 88 attr->max_sge_rd = dev->attr.max_rdma_sge;
88 attr->max_cq = dev->attr.max_cq; 89 attr->max_cq = dev->attr.max_cq;
@@ -1015,6 +1016,7 @@ static void ocrdma_set_qp_init_params(struct ocrdma_qp *qp,
1015 qp->sq.max_sges = attrs->cap.max_send_sge; 1016 qp->sq.max_sges = attrs->cap.max_send_sge;
1016 qp->rq.max_sges = attrs->cap.max_recv_sge; 1017 qp->rq.max_sges = attrs->cap.max_recv_sge;
1017 qp->state = OCRDMA_QPS_RST; 1018 qp->state = OCRDMA_QPS_RST;
1019 qp->signaled = (attrs->sq_sig_type == IB_SIGNAL_ALL_WR) ? true : false;
1018} 1020}
1019 1021
1020 1022
@@ -1864,7 +1866,7 @@ int ocrdma_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
1864 } 1866 }
1865 hdr = ocrdma_hwq_head(&qp->sq); 1867 hdr = ocrdma_hwq_head(&qp->sq);
1866 hdr->cw = 0; 1868 hdr->cw = 0;
1867 if (wr->send_flags & IB_SEND_SIGNALED) 1869 if (wr->send_flags & IB_SEND_SIGNALED || qp->signaled)
1868 hdr->cw |= (OCRDMA_FLAG_SIG << OCRDMA_WQE_FLAGS_SHIFT); 1870 hdr->cw |= (OCRDMA_FLAG_SIG << OCRDMA_WQE_FLAGS_SHIFT);
1869 if (wr->send_flags & IB_SEND_FENCE) 1871 if (wr->send_flags & IB_SEND_FENCE)
1870 hdr->cw |= 1872 hdr->cw |=
@@ -1918,7 +1920,7 @@ int ocrdma_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
1918 *bad_wr = wr; 1920 *bad_wr = wr;
1919 break; 1921 break;
1920 } 1922 }
1921 if (wr->send_flags & IB_SEND_SIGNALED) 1923 if (wr->send_flags & IB_SEND_SIGNALED || qp->signaled)
1922 qp->wqe_wr_id_tbl[qp->sq.head].signaled = 1; 1924 qp->wqe_wr_id_tbl[qp->sq.head].signaled = 1;
1923 else 1925 else
1924 qp->wqe_wr_id_tbl[qp->sq.head].signaled = 0; 1926 qp->wqe_wr_id_tbl[qp->sq.head].signaled = 0;