diff options
author | Michael S. Tsirkin <mst@mellanox.co.il> | 2005-11-28 14:19:43 -0500 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2005-11-28 14:19:43 -0500 |
commit | 187a25863fe014486ee834164776b2a587d6934d (patch) | |
tree | 918111360e352d128126bb338227ec4fb6e8afbc /drivers | |
parent | 458af5439fe7ae7d95ca14106844e61f0795166c (diff) |
IB/mthca: reset QP's last pointers when transitioning to reset state
last pointer is not updated when QP is modified to reset state. This
causes data corruption if WQEs are already posted on the queue.
Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_qp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_qp.c b/drivers/infiniband/hw/mthca/mthca_qp.c index dd4e13303e96..f9c8eb9845c9 100644 --- a/drivers/infiniband/hw/mthca/mthca_qp.c +++ b/drivers/infiniband/hw/mthca/mthca_qp.c | |||
@@ -871,7 +871,10 @@ int mthca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask) | |||
871 | qp->ibqp.srq ? to_msrq(qp->ibqp.srq) : NULL); | 871 | qp->ibqp.srq ? to_msrq(qp->ibqp.srq) : NULL); |
872 | 872 | ||
873 | mthca_wq_init(&qp->sq); | 873 | mthca_wq_init(&qp->sq); |
874 | qp->sq.last = get_send_wqe(qp, qp->sq.max - 1); | ||
875 | |||
874 | mthca_wq_init(&qp->rq); | 876 | mthca_wq_init(&qp->rq); |
877 | qp->rq.last = get_recv_wqe(qp, qp->rq.max - 1); | ||
875 | 878 | ||
876 | if (mthca_is_memfree(dev)) { | 879 | if (mthca_is_memfree(dev)) { |
877 | *qp->sq.db = 0; | 880 | *qp->sq.db = 0; |