Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c1f74958dbd19f6a837d887ed416688c063af529
Commit:     c1f74958dbd19f6a837d887ed416688c063af529
Parent:     bd631048116df40837667a72c578b170c906dd30
Author:     Michael S. Tsirkin <[EMAIL PROTECTED]>
AuthorDate: Thu Jul 19 14:28:49 2007 +0300
Committer:  Roland Dreier <[EMAIL PROTECTED]>
CommitDate: Fri Jul 20 21:19:43 2007 -0700

    IB/mthca: Change command token on timeout
    
    The FW command token is currently only updated on a command completion
    event. This means that on command timeout, the same token will be
    reused for new command, which results in a mess if the timed out
    command *does* eventually complete.
    
    Signed-off-by: Michael S. Tsirkin <[EMAIL PROTECTED]>
    Signed-off-by: Roland Dreier <[EMAIL PROTECTED]>
---
 drivers/infiniband/hw/mthca/mthca_cmd.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/infiniband/hw/mthca/mthca_cmd.c 
b/drivers/infiniband/hw/mthca/mthca_cmd.c
index f40558d..acc9589 100644
--- a/drivers/infiniband/hw/mthca/mthca_cmd.c
+++ b/drivers/infiniband/hw/mthca/mthca_cmd.c
@@ -357,8 +357,6 @@ void mthca_cmd_event(struct mthca_dev *dev,
        context->status    = status;
        context->out_param = out_param;
 
-       context->token += dev->cmd.token_mask + 1;
-
        complete(&context->done);
 }
 
@@ -380,6 +378,7 @@ static int mthca_cmd_wait(struct mthca_dev *dev,
        spin_lock(&dev->cmd.context_lock);
        BUG_ON(dev->cmd.free_head < 0);
        context = &dev->cmd.context[dev->cmd.free_head];
+       context->token += dev->cmd.token_mask + 1;
        dev->cmd.free_head = context->next;
        spin_unlock(&dev->cmd.context_lock);
 
-
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