Commit 0964d916 authored by Michael S. Tsirkin's avatar Michael S. Tsirkin Committed by Linus Torvalds

[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: default avatarMichael S. Tsirkin <mst@mellanox.co.il>
Cc: Roland Dreier <rolandd@cisco.com>
Acked-by: default avatarZach Brown <zach.brown@oracle.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 2290d2c9
...@@ -222,9 +222,8 @@ static void *get_send_wqe(struct mthca_qp *qp, int n) ...@@ -222,9 +222,8 @@ static void *get_send_wqe(struct mthca_qp *qp, int n)
(PAGE_SIZE - 1)); (PAGE_SIZE - 1));
} }
static void mthca_wq_init(struct mthca_wq *wq) static void mthca_wq_reset(struct mthca_wq *wq)
{ {
/* mthca_alloc_qp_common() initializes the locks */
wq->next_ind = 0; wq->next_ind = 0;
wq->last_comp = wq->max - 1; wq->last_comp = wq->max - 1;
wq->head = 0; wq->head = 0;
...@@ -845,10 +844,10 @@ int mthca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask) ...@@ -845,10 +844,10 @@ int mthca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask)
mthca_cq_clean(dev, to_mcq(qp->ibqp.recv_cq), qp->qpn, mthca_cq_clean(dev, to_mcq(qp->ibqp.recv_cq), qp->qpn,
qp->ibqp.srq ? to_msrq(qp->ibqp.srq) : NULL); qp->ibqp.srq ? to_msrq(qp->ibqp.srq) : NULL);
mthca_wq_init(&qp->sq); mthca_wq_reset(&qp->sq);
qp->sq.last = get_send_wqe(qp, qp->sq.max - 1); qp->sq.last = get_send_wqe(qp, qp->sq.max - 1);
mthca_wq_init(&qp->rq); mthca_wq_reset(&qp->rq);
qp->rq.last = get_recv_wqe(qp, qp->rq.max - 1); qp->rq.last = get_recv_wqe(qp, qp->rq.max - 1);
if (mthca_is_memfree(dev)) { if (mthca_is_memfree(dev)) {
...@@ -1112,9 +1111,9 @@ static int mthca_alloc_qp_common(struct mthca_dev *dev, ...@@ -1112,9 +1111,9 @@ static int mthca_alloc_qp_common(struct mthca_dev *dev,
qp->atomic_rd_en = 0; qp->atomic_rd_en = 0;
qp->resp_depth = 0; qp->resp_depth = 0;
qp->sq_policy = send_policy; qp->sq_policy = send_policy;
mthca_wq_init(&qp->sq); mthca_wq_reset(&qp->sq);
mthca_wq_init(&qp->rq); mthca_wq_reset(&qp->rq);
/* these are initialized separately so lockdep can tell them apart */
spin_lock_init(&qp->sq.lock); spin_lock_init(&qp->sq.lock);
spin_lock_init(&qp->rq.lock); spin_lock_init(&qp->rq.lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment