Commit:     8b7e15772a286d0ef8e4f8eca422ce5368b6fa97
Parent:     6e98ee75c3ab99db48ecc0615c2246dc193111a9
Author:     Michael S. Tsirkin <[EMAIL PROTECTED]>
AuthorDate: Sun May 27 18:06:42 2007 +0300
Committer:  Roland Dreier <[EMAIL PROTECTED]>
CommitDate: Tue May 29 16:07:09 2007 -0700

    IB/mthca: Fix handling of send CQE with error for QPs connected to SRQ
    mthca_free_err_wqe() currently treats both send and receive CQEs
    identically if a QP is using an SRQ.  But for Tavor hardware, send
    CQEs with error can be chained together even if the RQ is part of SRQ,
    so we may miss some CQEs.
    Fix by following the WQE chain for all send CQEs even for non-SRQ QPs.
    This fixes crashes in IPoIB CM:
    Signed-off-by: Michael S. Tsirkin <[EMAIL PROTECTED]>
    Signed-off-by: Roland Dreier <[EMAIL PROTECTED]>
 drivers/infiniband/hw/mthca/mthca_qp.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/infiniband/hw/mthca/mthca_qp.c 
index 0276649..eef415b 100644
--- a/drivers/infiniband/hw/mthca/mthca_qp.c
+++ b/drivers/infiniband/hw/mthca/mthca_qp.c
@@ -2284,10 +2284,10 @@ void mthca_free_err_wqe(struct mthca_dev *dev, struct 
mthca_qp *qp, int is_send,
        struct mthca_next_seg *next;
-        * For SRQs, all WQEs generate a CQE, so we're always at the
-        * end of the doorbell chain.
+        * For SRQs, all receive WQEs generate a CQE, so we're always
+        * at the end of the doorbell chain.
-       if (qp->ibqp.srq) {
+       if (qp->ibqp.srq && !is_send) {
                *new_wqe = 0;
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to