IB/ipath: Reset the retry counter for RDMA_READ_RESPONSE_MIDDLE packets
authorPatrick Marchand Latifi <patrick.latifi@qlogic.com>
Thu, 21 Feb 2008 03:08:10 +0000 (19:08 -0800)
committerRoland Dreier <rolandd@cisco.com>
Tue, 11 Mar 2008 21:04:35 +0000 (14:04 -0700)
Reset the retry counter when we get a good RDMA_READ_RESPONSE_MIDDLE
packet.  This fix will prevent the requester from reporting a retry
exceeded error too early.

Signed-off-by: Patrick Marchand Latifi <patrick.latifi@qlogic.com>
drivers/infiniband/hw/ipath/ipath_rc.c

index 459e46e..40f3e37 100644 (file)
@@ -1196,6 +1196,10 @@ static inline void ipath_rc_rcv_resp(struct ipath_ibdev *dev,
                        list_move_tail(&qp->timerwait,
                                       &dev->pending[dev->pending_index]);
                spin_unlock(&dev->pending_lock);
+
+               if (opcode == OP(RDMA_READ_RESPONSE_MIDDLE))
+                       qp->s_retry = qp->s_retry_cnt;
+
                /*
                 * Update the RDMA receive state but do the copy w/o
                 * holding the locks and blocking interrupts.