aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw
diff options
context:
space:
mode:
authorRalph Campbell <ralph.campbell@qlogic.com>2008-05-13 14:42:20 -0400
committerRoland Dreier <rolandd@cisco.com>2008-05-13 14:42:20 -0400
commit74116f580b7279543340dd716a2af642f5c1c2c7 (patch)
tree3c667c606001ee9d053305180ba8d465a5fe587c /drivers/infiniband/hw
parente509be898d8937634437caa474b57ac12795e5bc (diff)
IB/ipath: Fix RDMA read response sequence checking
If an out of sequence RDMA read response middle or last packet is received, we should only resend the RDMA read request on the first out of sequence packet and drop subsequent out of sequence packets otherwise, we get "too many retries". Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw')
-rw-r--r--drivers/infiniband/hw/ipath/ipath_rc.c7
-rw-r--r--drivers/infiniband/hw/ipath/ipath_verbs.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_rc.c b/drivers/infiniband/hw/ipath/ipath_rc.c
index 5b5276a270bc..108df667d2ee 100644
--- a/drivers/infiniband/hw/ipath/ipath_rc.c
+++ b/drivers/infiniband/hw/ipath/ipath_rc.c
@@ -1189,6 +1189,7 @@ static inline void ipath_rc_rcv_resp(struct ipath_ibdev *dev,
1189 wqe = get_swqe_ptr(qp, qp->s_last); 1189 wqe = get_swqe_ptr(qp, qp->s_last);
1190 if (unlikely(wqe->wr.opcode != IB_WR_RDMA_READ)) 1190 if (unlikely(wqe->wr.opcode != IB_WR_RDMA_READ))
1191 goto ack_op_err; 1191 goto ack_op_err;
1192 qp->r_flags &= ~IPATH_R_RDMAR_SEQ;
1192 /* 1193 /*
1193 * If this is a response to a resent RDMA read, we 1194 * If this is a response to a resent RDMA read, we
1194 * have to be careful to copy the data to the right 1195 * have to be careful to copy the data to the right
@@ -1202,6 +1203,9 @@ static inline void ipath_rc_rcv_resp(struct ipath_ibdev *dev,
1202 /* no AETH, no ACK */ 1203 /* no AETH, no ACK */
1203 if (unlikely(ipath_cmp24(psn, qp->s_last_psn + 1))) { 1204 if (unlikely(ipath_cmp24(psn, qp->s_last_psn + 1))) {
1204 dev->n_rdma_seq++; 1205 dev->n_rdma_seq++;
1206 if (qp->r_flags & IPATH_R_RDMAR_SEQ)
1207 goto ack_done;
1208 qp->r_flags |= IPATH_R_RDMAR_SEQ;
1205 ipath_restart_rc(qp, qp->s_last_psn + 1); 1209 ipath_restart_rc(qp, qp->s_last_psn + 1);
1206 goto ack_done; 1210 goto ack_done;
1207 } 1211 }
@@ -1263,6 +1267,9 @@ static inline void ipath_rc_rcv_resp(struct ipath_ibdev *dev,
1263 /* ACKs READ req. */ 1267 /* ACKs READ req. */
1264 if (unlikely(ipath_cmp24(psn, qp->s_last_psn + 1))) { 1268 if (unlikely(ipath_cmp24(psn, qp->s_last_psn + 1))) {
1265 dev->n_rdma_seq++; 1269 dev->n_rdma_seq++;
1270 if (qp->r_flags & IPATH_R_RDMAR_SEQ)
1271 goto ack_done;
1272 qp->r_flags |= IPATH_R_RDMAR_SEQ;
1266 ipath_restart_rc(qp, qp->s_last_psn + 1); 1273 ipath_restart_rc(qp, qp->s_last_psn + 1);
1267 goto ack_done; 1274 goto ack_done;
1268 } 1275 }
diff --git a/drivers/infiniband/hw/ipath/ipath_verbs.h b/drivers/infiniband/hw/ipath/ipath_verbs.h
index deee02ca7ca4..9d12ae8a778e 100644
--- a/drivers/infiniband/hw/ipath/ipath_verbs.h
+++ b/drivers/infiniband/hw/ipath/ipath_verbs.h
@@ -444,6 +444,7 @@ struct ipath_qp {
444 * Bit definitions for r_flags. 444 * Bit definitions for r_flags.
445 */ 445 */
446#define IPATH_R_REUSE_SGE 0x01 446#define IPATH_R_REUSE_SGE 0x01
447#define IPATH_R_RDMAR_SEQ 0x02
447 448
448/* 449/*
449 * Bit definitions for s_flags. 450 * Bit definitions for s_flags.