diff options
author | Michael S. Tsirkin <mst@mellanox.co.il> | 2006-07-14 03:23:51 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-15 00:53:50 -0400 |
commit | 0964d9161826ca5cab5a03192490ec676c8abf8c (patch) | |
tree | a9471c2d15ab12209bab5109728a49ba5ca0ff42 /drivers/infiniband/hw/mthca/mthca_qp.c | |
parent | 2290d2c9f51d7ee2f45adee79b4d9e080ca15d36 (diff) |
[PATCH] IB/mthca: comment fix
After recent changes, mthca_wq_init does not actually initialize the WQ as it
used to - it simply resets all index fields to their initial values. So,
let's rename it to mthca_wq_reset.
Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Cc: Roland Dreier <rolandd@cisco.com>
Acked-by: Zach Brown <zach.brown@oracle.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/infiniband/hw/mthca/mthca_qp.c')
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_qp.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_qp.c b/drivers/infiniband/hw/mthca/mthca_qp.c index 490fc783bb0c..cd8b6721ac9c 100644 --- a/drivers/infiniband/hw/mthca/mthca_qp.c +++ b/drivers/infiniband/hw/mthca/mthca_qp.c | |||
@@ -222,9 +222,8 @@ static void *get_send_wqe(struct mthca_qp *qp, int n) | |||
222 | (PAGE_SIZE - 1)); | 222 | (PAGE_SIZE - 1)); |
223 | } | 223 | } |
224 | 224 | ||
225 | static void mthca_wq_init(struct mthca_wq *wq) | 225 | static void mthca_wq_reset(struct mthca_wq *wq) |
226 | { | 226 | { |
227 | /* mthca_alloc_qp_common() initializes the locks */ | ||
228 | wq->next_ind = 0; | 227 | wq->next_ind = 0; |
229 | wq->last_comp = wq->max - 1; | 228 | wq->last_comp = wq->max - 1; |
230 | wq->head = 0; | 229 | wq->head = 0; |
@@ -845,10 +844,10 @@ int mthca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask) | |||
845 | mthca_cq_clean(dev, to_mcq(qp->ibqp.recv_cq), qp->qpn, | 844 | mthca_cq_clean(dev, to_mcq(qp->ibqp.recv_cq), qp->qpn, |
846 | qp->ibqp.srq ? to_msrq(qp->ibqp.srq) : NULL); | 845 | qp->ibqp.srq ? to_msrq(qp->ibqp.srq) : NULL); |
847 | 846 | ||
848 | mthca_wq_init(&qp->sq); | 847 | mthca_wq_reset(&qp->sq); |
849 | qp->sq.last = get_send_wqe(qp, qp->sq.max - 1); | 848 | qp->sq.last = get_send_wqe(qp, qp->sq.max - 1); |
850 | 849 | ||
851 | mthca_wq_init(&qp->rq); | 850 | mthca_wq_reset(&qp->rq); |
852 | qp->rq.last = get_recv_wqe(qp, qp->rq.max - 1); | 851 | qp->rq.last = get_recv_wqe(qp, qp->rq.max - 1); |
853 | 852 | ||
854 | if (mthca_is_memfree(dev)) { | 853 | if (mthca_is_memfree(dev)) { |
@@ -1112,9 +1111,9 @@ static int mthca_alloc_qp_common(struct mthca_dev *dev, | |||
1112 | qp->atomic_rd_en = 0; | 1111 | qp->atomic_rd_en = 0; |
1113 | qp->resp_depth = 0; | 1112 | qp->resp_depth = 0; |
1114 | qp->sq_policy = send_policy; | 1113 | qp->sq_policy = send_policy; |
1115 | mthca_wq_init(&qp->sq); | 1114 | mthca_wq_reset(&qp->sq); |
1116 | mthca_wq_init(&qp->rq); | 1115 | mthca_wq_reset(&qp->rq); |
1117 | /* these are initialized separately so lockdep can tell them apart */ | 1116 | |
1118 | spin_lock_init(&qp->sq.lock); | 1117 | spin_lock_init(&qp->sq.lock); |
1119 | spin_lock_init(&qp->rq.lock); | 1118 | spin_lock_init(&qp->rq.lock); |
1120 | 1119 | ||