Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=856b5925047d73a85557203d124d62c5eea1fbd3
Commit:     856b5925047d73a85557203d124d62c5eea1fbd3
Parent:     4e1e93a4189a98cfb0e24865f7f44470ae5f805e
Author:     Steve Wise <[EMAIL PROTECTED]>
AuthorDate: Mon Jan 21 14:42:09 2008 -0600
Committer:  Roland Dreier <[EMAIL PROTECTED]>
CommitDate: Fri Jan 25 14:17:45 2008 -0800

    RDMA/cxgb3: Flush the receive queue when closing
    
    - for kernel mode cqs, call event notification handler when flushing.
    - flush QP when moving from RTS -> CLOSING.
    - fix logic to identify a kernel mode qp.
    
    Signed-off-by: Steve Wise <[EMAIL PROTECTED]>
    Signed-off-by: Roland Dreier <[EMAIL PROTECTED]>
---
 drivers/infiniband/hw/cxgb3/iwch_qp.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/infiniband/hw/cxgb3/iwch_qp.c 
b/drivers/infiniband/hw/cxgb3/iwch_qp.c
index 9bb8112..7681fdc 100644
--- a/drivers/infiniband/hw/cxgb3/iwch_qp.c
+++ b/drivers/infiniband/hw/cxgb3/iwch_qp.c
@@ -642,6 +642,7 @@ static void __flush_qp(struct iwch_qp *qhp, unsigned long 
*flag)
        cxio_flush_rq(&qhp->wq, &rchp->cq, count);
        spin_unlock(&qhp->lock);
        spin_unlock_irqrestore(&rchp->lock, *flag);
+       (*rchp->ibcq.comp_handler)(&rchp->ibcq, rchp->ibcq.cq_context);
 
        /* locking heirarchy: cq lock first, then qp lock. */
        spin_lock_irqsave(&schp->lock, *flag);
@@ -651,6 +652,7 @@ static void __flush_qp(struct iwch_qp *qhp, unsigned long 
*flag)
        cxio_flush_sq(&qhp->wq, &schp->cq, count);
        spin_unlock(&qhp->lock);
        spin_unlock_irqrestore(&schp->lock, *flag);
+       (*schp->ibcq.comp_handler)(&schp->ibcq, schp->ibcq.cq_context);
 
        /* deref */
        if (atomic_dec_and_test(&qhp->refcnt))
@@ -661,7 +663,7 @@ static void __flush_qp(struct iwch_qp *qhp, unsigned long 
*flag)
 
 static void flush_qp(struct iwch_qp *qhp, unsigned long *flag)
 {
-       if (t3b_device(qhp->rhp))
+       if (qhp->ibqp.uobject)
                cxio_set_wq_in_error(&qhp->wq);
        else
                __flush_qp(qhp, flag);
@@ -830,10 +832,11 @@ int iwch_modify_qp(struct iwch_dev *rhp, struct iwch_qp 
*qhp,
                                disconnect = 1;
                                ep = qhp->ep;
                        }
+                       flush_qp(qhp, &flag);
                        break;
                case IWCH_QP_STATE_TERMINATE:
                        qhp->attr.state = IWCH_QP_STATE_TERMINATE;
-                       if (t3b_device(qhp->rhp))
+                       if (qhp->ibqp.uobject)
                                cxio_set_wq_in_error(&qhp->wq);
                        if (!internal)
                                terminate = 1;
-
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  http://vger.kernel.org/majordomo-info.html

Reply via email to