diff options
Diffstat (limited to 'drivers/infiniband/hw/amso1100/c2_qp.c')
-rw-r--r-- | drivers/infiniband/hw/amso1100/c2_qp.c | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/drivers/infiniband/hw/amso1100/c2_qp.c b/drivers/infiniband/hw/amso1100/c2_qp.c index 01d07862ea86..a6d89440ad2c 100644 --- a/drivers/infiniband/hw/amso1100/c2_qp.c +++ b/drivers/infiniband/hw/amso1100/c2_qp.c | |||
@@ -121,7 +121,7 @@ void c2_set_qp_state(struct c2_qp *qp, int c2_state) | |||
121 | int new_state = to_ib_state(c2_state); | 121 | int new_state = to_ib_state(c2_state); |
122 | 122 | ||
123 | pr_debug("%s: qp[%p] state modify %s --> %s\n", | 123 | pr_debug("%s: qp[%p] state modify %s --> %s\n", |
124 | __FUNCTION__, | 124 | __func__, |
125 | qp, | 125 | qp, |
126 | to_ib_state_str(qp->state), | 126 | to_ib_state_str(qp->state), |
127 | to_ib_state_str(new_state)); | 127 | to_ib_state_str(new_state)); |
@@ -141,7 +141,7 @@ int c2_qp_modify(struct c2_dev *c2dev, struct c2_qp *qp, | |||
141 | int err; | 141 | int err; |
142 | 142 | ||
143 | pr_debug("%s:%d qp=%p, %s --> %s\n", | 143 | pr_debug("%s:%d qp=%p, %s --> %s\n", |
144 | __FUNCTION__, __LINE__, | 144 | __func__, __LINE__, |
145 | qp, | 145 | qp, |
146 | to_ib_state_str(qp->state), | 146 | to_ib_state_str(qp->state), |
147 | to_ib_state_str(attr->qp_state)); | 147 | to_ib_state_str(attr->qp_state)); |
@@ -224,7 +224,7 @@ int c2_qp_modify(struct c2_dev *c2dev, struct c2_qp *qp, | |||
224 | qp->state = next_state; | 224 | qp->state = next_state; |
225 | #ifdef DEBUG | 225 | #ifdef DEBUG |
226 | else | 226 | else |
227 | pr_debug("%s: c2_errno=%d\n", __FUNCTION__, err); | 227 | pr_debug("%s: c2_errno=%d\n", __func__, err); |
228 | #endif | 228 | #endif |
229 | /* | 229 | /* |
230 | * If we're going to error and generating the event here, then | 230 | * If we're going to error and generating the event here, then |
@@ -243,7 +243,7 @@ int c2_qp_modify(struct c2_dev *c2dev, struct c2_qp *qp, | |||
243 | vq_req_free(c2dev, vq_req); | 243 | vq_req_free(c2dev, vq_req); |
244 | 244 | ||
245 | pr_debug("%s:%d qp=%p, cur_state=%s\n", | 245 | pr_debug("%s:%d qp=%p, cur_state=%s\n", |
246 | __FUNCTION__, __LINE__, | 246 | __func__, __LINE__, |
247 | qp, | 247 | qp, |
248 | to_ib_state_str(qp->state)); | 248 | to_ib_state_str(qp->state)); |
249 | return err; | 249 | return err; |
@@ -811,16 +811,24 @@ int c2_post_send(struct ib_qp *ibqp, struct ib_send_wr *ib_wr, | |||
811 | 811 | ||
812 | switch (ib_wr->opcode) { | 812 | switch (ib_wr->opcode) { |
813 | case IB_WR_SEND: | 813 | case IB_WR_SEND: |
814 | if (ib_wr->send_flags & IB_SEND_SOLICITED) { | 814 | case IB_WR_SEND_WITH_INV: |
815 | c2_wr_set_id(&wr, C2_WR_TYPE_SEND_SE); | 815 | if (ib_wr->opcode == IB_WR_SEND) { |
816 | msg_size = sizeof(struct c2wr_send_req); | 816 | if (ib_wr->send_flags & IB_SEND_SOLICITED) |
817 | c2_wr_set_id(&wr, C2_WR_TYPE_SEND_SE); | ||
818 | else | ||
819 | c2_wr_set_id(&wr, C2_WR_TYPE_SEND); | ||
820 | wr.sqwr.send.remote_stag = 0; | ||
817 | } else { | 821 | } else { |
818 | c2_wr_set_id(&wr, C2_WR_TYPE_SEND); | 822 | if (ib_wr->send_flags & IB_SEND_SOLICITED) |
819 | msg_size = sizeof(struct c2wr_send_req); | 823 | c2_wr_set_id(&wr, C2_WR_TYPE_SEND_SE_INV); |
824 | else | ||
825 | c2_wr_set_id(&wr, C2_WR_TYPE_SEND_INV); | ||
826 | wr.sqwr.send.remote_stag = | ||
827 | cpu_to_be32(ib_wr->ex.invalidate_rkey); | ||
820 | } | 828 | } |
821 | 829 | ||
822 | wr.sqwr.send.remote_stag = 0; | 830 | msg_size = sizeof(struct c2wr_send_req) + |
823 | msg_size += sizeof(struct c2_data_addr) * ib_wr->num_sge; | 831 | sizeof(struct c2_data_addr) * ib_wr->num_sge; |
824 | if (ib_wr->num_sge > qp->send_sgl_depth) { | 832 | if (ib_wr->num_sge > qp->send_sgl_depth) { |
825 | err = -EINVAL; | 833 | err = -EINVAL; |
826 | break; | 834 | break; |