Commit:     db5518cd09c21f0fa70af0a4ca38badd90622c9e
Parent:     06ee109002672ac875558ec699b53cf08a865bd3
Author:     Ralph Campbell <[EMAIL PROTECTED]>
AuthorDate: Mon Jun 18 14:24:43 2007 -0700
Committer:  Roland Dreier <[EMAIL PROTECTED]>
CommitDate: Mon Jul 9 20:12:26 2007 -0700

    IB/ipath: Wait for PIO available interrupt
    The send function is called when posting new send work requests.
    There is no point in trying to send a packet if the QP is already
    waiting for a HW send buffer so don't clear the busy bit until the
    buffer available interrupt happens.
    Signed-off-by: Ralph Campbell <[EMAIL PROTECTED]>
    Signed-off-by: Roland Dreier <[EMAIL PROTECTED]>
 drivers/infiniband/hw/ipath/ipath_ruc.c   |    6 ++----
 drivers/infiniband/hw/ipath/ipath_verbs.c |    1 +
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/infiniband/hw/ipath/ipath_ruc.c 
index 8c5d20a..8371186 100644
--- a/drivers/infiniband/hw/ipath/ipath_ruc.c
+++ b/drivers/infiniband/hw/ipath/ipath_ruc.c
@@ -503,11 +503,9 @@ void ipath_no_bufs_available(struct ipath_qp *qp, struct 
ipath_ibdev *dev)
         * could be called.  If we are still in the tasklet function,
         * tasklet_hi_schedule() will not call us until the next time
         * tasklet_hi_schedule() is called.
-        * We clear the tasklet flag now since we are committing to return
-        * from the tasklet function.
+        * We leave the busy flag set so that another post send doesn't
+        * try to put the same QP on the piowait list again.
-       clear_bit(IPATH_S_BUSY, &qp->s_busy);
-       tasklet_unlock(&qp->s_task);
diff --git a/drivers/infiniband/hw/ipath/ipath_verbs.c 
index 04294ca..cd79a8c 100644
--- a/drivers/infiniband/hw/ipath/ipath_verbs.c
+++ b/drivers/infiniband/hw/ipath/ipath_verbs.c
@@ -948,6 +948,7 @@ int ipath_ib_piobufavail(struct ipath_ibdev *dev)
                qp = list_entry(dev->, struct ipath_qp,
+               clear_bit(IPATH_S_BUSY, &qp->s_busy);
        spin_unlock_irqrestore(&dev->pending_lock, flags);
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