Hello, Roland!
The following patch fixes system hangs I am sometimes seeing when
ipoib is brought down and back up.

Should something similiar be done in libmthca?

Thanks,
MST

---

mthca: last pointer was not updated when qp was modified to reset state.
This causes data corruption if wqes were already posted on the queue.

Signed-off-by: Michael S. Tsirkin <[EMAIL PROTECTED]>

Index: latest/drivers/infiniband/hw/mthca/mthca_qp.c
===================================================================
--- latest.orig/drivers/infiniband/hw/mthca/mthca_qp.c
+++ latest/drivers/infiniband/hw/mthca/mthca_qp.c
@@ -869,7 +869,10 @@ int mthca_modify_qp(struct ib_qp *ibqp, 
                                       qp->ibqp.srq ? to_msrq(qp->ibqp.srq) : 
NULL);
 
                mthca_wq_init(&qp->sq);
+               qp->sq.last = get_send_wqe(qp, qp->sq.max - 1);
+
                mthca_wq_init(&qp->rq);
+               qp->rq.last = get_recv_wqe(qp, qp->rq.max - 1);
 
                if (mthca_is_memfree(dev)) {
                        *qp->sq.db = 0;

-- 
MST
_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to