diff options
author | Roland Dreier <rolandd@cisco.com> | 2006-09-22 18:22:55 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2006-09-22 18:22:55 -0400 |
commit | d35cc330a2058a32410ef42784b8d3b942f37b8b (patch) | |
tree | d01f8996ab79610edbf070c21b9200480c5b126f /drivers | |
parent | 951f7fc1372da3d826b1d975b3cc5e3db92af5d0 (diff) |
IB/mthca: Simplify calls to mthca_cq_clean()
If a QP has separate send and receive CQs, then the send CQ will never
have receive completions from that QP in it. So when cleaning the
send CQ, there's no need to pass in an SRQ pointer, even if the QP is
attached to an SRQ.
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_qp.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_qp.c b/drivers/infiniband/hw/mthca/mthca_qp.c index 9324b6204ac5..5e5c58b9920b 100644 --- a/drivers/infiniband/hw/mthca/mthca_qp.c +++ b/drivers/infiniband/hw/mthca/mthca_qp.c | |||
@@ -845,11 +845,10 @@ int mthca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask, | |||
845 | * entries and reinitialize the QP. | 845 | * entries and reinitialize the QP. |
846 | */ | 846 | */ |
847 | if (new_state == IB_QPS_RESET && !qp->ibqp.uobject) { | 847 | if (new_state == IB_QPS_RESET && !qp->ibqp.uobject) { |
848 | mthca_cq_clean(dev, to_mcq(qp->ibqp.send_cq), qp->qpn, | 848 | mthca_cq_clean(dev, to_mcq(qp->ibqp.recv_cq), qp->qpn, |
849 | qp->ibqp.srq ? to_msrq(qp->ibqp.srq) : NULL); | 849 | qp->ibqp.srq ? to_msrq(qp->ibqp.srq) : NULL); |
850 | if (qp->ibqp.send_cq != qp->ibqp.recv_cq) | 850 | if (qp->ibqp.send_cq != qp->ibqp.recv_cq) |
851 | mthca_cq_clean(dev, to_mcq(qp->ibqp.recv_cq), qp->qpn, | 851 | mthca_cq_clean(dev, to_mcq(qp->ibqp.send_cq), qp->qpn, NULL); |
852 | qp->ibqp.srq ? to_msrq(qp->ibqp.srq) : NULL); | ||
853 | 852 | ||
854 | mthca_wq_reset(&qp->sq); | 853 | mthca_wq_reset(&qp->sq); |
855 | qp->sq.last = get_send_wqe(qp, qp->sq.max - 1); | 854 | qp->sq.last = get_send_wqe(qp, qp->sq.max - 1); |