diff options
author | Ralph Campbell <ralph.campbell@qlogic.com> | 2007-12-14 19:22:34 -0800 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2008-01-25 14:15:34 -0800 |
commit | cc65edcf0c174eff4367cfbc594a2f33c0d477fa (patch) | |
tree | 0422b9197852617730b9b0d51964726dd5518ec3 /drivers/infiniband/hw/ipath/ipath_ruc.c | |
parent | e57d62a14775c9d37195debe837431c75168ef69 (diff) | |
download | blackbird-op-linux-cc65edcf0c174eff4367cfbc594a2f33c0d477fa.tar.gz blackbird-op-linux-cc65edcf0c174eff4367cfbc594a2f33c0d477fa.zip |
IB/ipath: Fix RNR NAK handling
This patch fixes a couple of minor problems with RNR NAK handling:
- The insertion sort was causing extra delay when inserting ahead
vs. behind an existing entry on the list.
- A resend of a first packet of a message which is still not ready,
needs another RNR NAK (i.e., it was suppressed when it shouldn't).
- Also, the resend tasklet doesn't need to be woken up unless the
ACK/NAK actually indicates progress has been made.
Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_ruc.c')
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_ruc.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_ruc.c b/drivers/infiniband/hw/ipath/ipath_ruc.c index 1b4f7e113b21..a59bdbd0ed87 100644 --- a/drivers/infiniband/hw/ipath/ipath_ruc.c +++ b/drivers/infiniband/hw/ipath/ipath_ruc.c @@ -98,11 +98,15 @@ void ipath_insert_rnr_queue(struct ipath_qp *qp) while (qp->s_rnr_timeout >= nqp->s_rnr_timeout) { qp->s_rnr_timeout -= nqp->s_rnr_timeout; l = l->next; - if (l->next == &dev->rnrwait) + if (l->next == &dev->rnrwait) { + nqp = NULL; break; + } nqp = list_entry(l->next, struct ipath_qp, timerwait); } + if (nqp) + nqp->s_rnr_timeout -= qp->s_rnr_timeout; list_add(&qp->timerwait, l); } spin_unlock_irqrestore(&dev->pending_lock, flags); |