diff options
author | Steve Wise <swise@opengridcomputing.com> | 2014-03-19 08:14:43 -0400 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2014-03-20 13:01:30 -0400 |
commit | ba32de9d8d8173a1d6dd1ed608c519d5d0a623bb (patch) | |
tree | bad21ff7d4aa480f7516403fa0e635d31afff83a | |
parent | 8a9c399eeee8c2d99e22b975f6023001a1fde88f (diff) |
RDMA/cxgb4: Mind the sq_sig_all/sq_sig_type QP attributes
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
-rw-r--r-- | drivers/infiniband/hw/cxgb4/iw_cxgb4.h | 1 | ||||
-rw-r--r-- | drivers/infiniband/hw/cxgb4/qp.c | 6 |
2 files changed, 5 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/cxgb4/iw_cxgb4.h b/drivers/infiniband/hw/cxgb4/iw_cxgb4.h index 23eaeabab93b..b810d2a89d05 100644 --- a/drivers/infiniband/hw/cxgb4/iw_cxgb4.h +++ b/drivers/infiniband/hw/cxgb4/iw_cxgb4.h | |||
@@ -441,6 +441,7 @@ struct c4iw_qp { | |||
441 | atomic_t refcnt; | 441 | atomic_t refcnt; |
442 | wait_queue_head_t wait; | 442 | wait_queue_head_t wait; |
443 | struct timer_list timer; | 443 | struct timer_list timer; |
444 | int sq_sig_all; | ||
444 | }; | 445 | }; |
445 | 446 | ||
446 | static inline struct c4iw_qp *to_c4iw_qp(struct ib_qp *ibqp) | 447 | static inline struct c4iw_qp *to_c4iw_qp(struct ib_qp *ibqp) |
diff --git a/drivers/infiniband/hw/cxgb4/qp.c b/drivers/infiniband/hw/cxgb4/qp.c index 72ea152c5f40..723ad290bd9d 100644 --- a/drivers/infiniband/hw/cxgb4/qp.c +++ b/drivers/infiniband/hw/cxgb4/qp.c | |||
@@ -675,7 +675,7 @@ int c4iw_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr, | |||
675 | fw_flags = 0; | 675 | fw_flags = 0; |
676 | if (wr->send_flags & IB_SEND_SOLICITED) | 676 | if (wr->send_flags & IB_SEND_SOLICITED) |
677 | fw_flags |= FW_RI_SOLICITED_EVENT_FLAG; | 677 | fw_flags |= FW_RI_SOLICITED_EVENT_FLAG; |
678 | if (wr->send_flags & IB_SEND_SIGNALED) | 678 | if (wr->send_flags & IB_SEND_SIGNALED || qhp->sq_sig_all) |
679 | fw_flags |= FW_RI_COMPLETION_FLAG; | 679 | fw_flags |= FW_RI_COMPLETION_FLAG; |
680 | swsqe = &qhp->wq.sq.sw_sq[qhp->wq.sq.pidx]; | 680 | swsqe = &qhp->wq.sq.sw_sq[qhp->wq.sq.pidx]; |
681 | switch (wr->opcode) { | 681 | switch (wr->opcode) { |
@@ -736,7 +736,8 @@ int c4iw_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr, | |||
736 | } | 736 | } |
737 | swsqe->idx = qhp->wq.sq.pidx; | 737 | swsqe->idx = qhp->wq.sq.pidx; |
738 | swsqe->complete = 0; | 738 | swsqe->complete = 0; |
739 | swsqe->signaled = (wr->send_flags & IB_SEND_SIGNALED); | 739 | swsqe->signaled = (wr->send_flags & IB_SEND_SIGNALED) || |
740 | qhp->sq_sig_all; | ||
740 | swsqe->flushed = 0; | 741 | swsqe->flushed = 0; |
741 | swsqe->wr_id = wr->wr_id; | 742 | swsqe->wr_id = wr->wr_id; |
742 | 743 | ||
@@ -1605,6 +1606,7 @@ struct ib_qp *c4iw_create_qp(struct ib_pd *pd, struct ib_qp_init_attr *attrs, | |||
1605 | qhp->attr.enable_bind = 1; | 1606 | qhp->attr.enable_bind = 1; |
1606 | qhp->attr.max_ord = 1; | 1607 | qhp->attr.max_ord = 1; |
1607 | qhp->attr.max_ird = 1; | 1608 | qhp->attr.max_ird = 1; |
1609 | qhp->sq_sig_all = attrs->sq_sig_type == IB_SIGNAL_ALL_WR; | ||
1608 | spin_lock_init(&qhp->lock); | 1610 | spin_lock_init(&qhp->lock); |
1609 | mutex_init(&qhp->mutex); | 1611 | mutex_init(&qhp->mutex); |
1610 | init_waitqueue_head(&qhp->wait); | 1612 | init_waitqueue_head(&qhp->wait); |