diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/infiniband/hw/amso1100/c2_qp.c | 22 | ||||
-rw-r--r-- | drivers/infiniband/hw/amso1100/c2_rnic.c | 3 |
2 files changed, 17 insertions, 8 deletions
diff --git a/drivers/infiniband/hw/amso1100/c2_qp.c b/drivers/infiniband/hw/amso1100/c2_qp.c index 9190bd52f51f..a6d89440ad2c 100644 --- a/drivers/infiniband/hw/amso1100/c2_qp.c +++ b/drivers/infiniband/hw/amso1100/c2_qp.c | |||
@@ -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; |
diff --git a/drivers/infiniband/hw/amso1100/c2_rnic.c b/drivers/infiniband/hw/amso1100/c2_rnic.c index b1441aeb60c2..9a054c6941a4 100644 --- a/drivers/infiniband/hw/amso1100/c2_rnic.c +++ b/drivers/infiniband/hw/amso1100/c2_rnic.c | |||
@@ -455,7 +455,8 @@ int __devinit c2_rnic_init(struct c2_dev *c2dev) | |||
455 | IB_DEVICE_CURR_QP_STATE_MOD | | 455 | IB_DEVICE_CURR_QP_STATE_MOD | |
456 | IB_DEVICE_SYS_IMAGE_GUID | | 456 | IB_DEVICE_SYS_IMAGE_GUID | |
457 | IB_DEVICE_ZERO_STAG | | 457 | IB_DEVICE_ZERO_STAG | |
458 | IB_DEVICE_MEM_WINDOW); | 458 | IB_DEVICE_MEM_WINDOW | |
459 | IB_DEVICE_SEND_W_INV); | ||
459 | 460 | ||
460 | /* Allocate the qptr_array */ | 461 | /* Allocate the qptr_array */ |
461 | c2dev->qptr_array = vmalloc(C2_MAX_CQS * sizeof(void *)); | 462 | c2dev->qptr_array = vmalloc(C2_MAX_CQS * sizeof(void *)); |