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>

authored by Michael S. Tsirkin and committed by Roland Dreier 187a2586 458af543

+3
+3
drivers/infiniband/hw/mthca/mthca_qp.c
··· 871 871 qp->ibqp.srq ? to_msrq(qp->ibqp.srq) : NULL); 872 872 873 873 mthca_wq_init(&qp->sq); 874 + qp->sq.last = get_send_wqe(qp, qp->sq.max - 1); 875 + 874 876 mthca_wq_init(&qp->rq); 877 + qp->rq.last = get_recv_wqe(qp, qp->rq.max - 1); 875 878 876 879 if (mthca_is_memfree(dev)) { 877 880 *qp->sq.db = 0;