diff options
Diffstat (limited to 'drivers/infiniband/hw/qib/qib_rc.c')
-rw-r--r-- | drivers/infiniband/hw/qib/qib_rc.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/infiniband/hw/qib/qib_rc.c b/drivers/infiniband/hw/qib/qib_rc.c index 46e6c9765ea6..1e8463de9efc 100644 --- a/drivers/infiniband/hw/qib/qib_rc.c +++ b/drivers/infiniband/hw/qib/qib_rc.c | |||
@@ -760,7 +760,7 @@ void qib_send_rc_ack(struct rvt_qp *qp) | |||
760 | 760 | ||
761 | queue_ack: | 761 | queue_ack: |
762 | if (ib_qib_state_ops[qp->state] & QIB_PROCESS_RECV_OK) { | 762 | if (ib_qib_state_ops[qp->state] & QIB_PROCESS_RECV_OK) { |
763 | ibp->n_rc_qacks++; | 763 | this_cpu_inc(*ibp->rvp.rc_qacks); |
764 | qp->s_flags |= QIB_S_ACK_PENDING | QIB_S_RESP_PENDING; | 764 | qp->s_flags |= QIB_S_ACK_PENDING | QIB_S_RESP_PENDING; |
765 | qp->s_nak_state = qp->r_nak_state; | 765 | qp->s_nak_state = qp->r_nak_state; |
766 | qp->s_ack_psn = qp->r_ack_psn; | 766 | qp->s_ack_psn = qp->r_ack_psn; |
@@ -888,9 +888,9 @@ static void qib_restart_rc(struct rvt_qp *qp, u32 psn, int wait) | |||
888 | 888 | ||
889 | ibp = to_iport(qp->ibqp.device, qp->port_num); | 889 | ibp = to_iport(qp->ibqp.device, qp->port_num); |
890 | if (wqe->wr.opcode == IB_WR_RDMA_READ) | 890 | if (wqe->wr.opcode == IB_WR_RDMA_READ) |
891 | ibp->n_rc_resends++; | 891 | ibp->rvp.n_rc_resends++; |
892 | else | 892 | else |
893 | ibp->n_rc_resends += (qp->s_psn - psn) & QIB_PSN_MASK; | 893 | ibp->rvp.n_rc_resends += (qp->s_psn - psn) & QIB_PSN_MASK; |
894 | 894 | ||
895 | qp->s_flags &= ~(QIB_S_WAIT_FENCE | QIB_S_WAIT_RDMAR | | 895 | qp->s_flags &= ~(QIB_S_WAIT_FENCE | QIB_S_WAIT_RDMAR | |
896 | QIB_S_WAIT_SSN_CREDIT | QIB_S_WAIT_PSN | | 896 | QIB_S_WAIT_SSN_CREDIT | QIB_S_WAIT_PSN | |
@@ -913,7 +913,7 @@ static void rc_timeout(unsigned long arg) | |||
913 | spin_lock(&qp->s_lock); | 913 | spin_lock(&qp->s_lock); |
914 | if (qp->s_flags & QIB_S_TIMER) { | 914 | if (qp->s_flags & QIB_S_TIMER) { |
915 | ibp = to_iport(qp->ibqp.device, qp->port_num); | 915 | ibp = to_iport(qp->ibqp.device, qp->port_num); |
916 | ibp->n_rc_timeouts++; | 916 | ibp->rvp.n_rc_timeouts++; |
917 | qp->s_flags &= ~QIB_S_TIMER; | 917 | qp->s_flags &= ~QIB_S_TIMER; |
918 | del_timer(&qp->s_timer); | 918 | del_timer(&qp->s_timer); |
919 | qib_restart_rc(qp, qp->s_last_psn + 1, 1); | 919 | qib_restart_rc(qp, qp->s_last_psn + 1, 1); |
@@ -1087,7 +1087,7 @@ static struct rvt_swqe *do_rc_completion(struct rvt_qp *qp, | |||
1087 | if (++qp->s_last >= qp->s_size) | 1087 | if (++qp->s_last >= qp->s_size) |
1088 | qp->s_last = 0; | 1088 | qp->s_last = 0; |
1089 | } else | 1089 | } else |
1090 | ibp->n_rc_delayed_comp++; | 1090 | this_cpu_inc(*ibp->rvp.rc_delayed_comp); |
1091 | 1091 | ||
1092 | qp->s_retry = qp->s_retry_cnt; | 1092 | qp->s_retry = qp->s_retry_cnt; |
1093 | update_last_psn(qp, wqe->lpsn); | 1093 | update_last_psn(qp, wqe->lpsn); |
@@ -1232,7 +1232,7 @@ static int do_rc_ack(struct rvt_qp *qp, u32 aeth, u32 psn, int opcode, | |||
1232 | 1232 | ||
1233 | switch (aeth >> 29) { | 1233 | switch (aeth >> 29) { |
1234 | case 0: /* ACK */ | 1234 | case 0: /* ACK */ |
1235 | ibp->n_rc_acks++; | 1235 | this_cpu_inc(*ibp->rvp.rc_acks); |
1236 | if (qp->s_acked != qp->s_tail) { | 1236 | if (qp->s_acked != qp->s_tail) { |
1237 | /* | 1237 | /* |
1238 | * We are expecting more ACKs so | 1238 | * We are expecting more ACKs so |
@@ -1261,7 +1261,7 @@ static int do_rc_ack(struct rvt_qp *qp, u32 aeth, u32 psn, int opcode, | |||
1261 | goto bail; | 1261 | goto bail; |
1262 | 1262 | ||
1263 | case 1: /* RNR NAK */ | 1263 | case 1: /* RNR NAK */ |
1264 | ibp->n_rnr_naks++; | 1264 | ibp->rvp.n_rnr_naks++; |
1265 | if (qp->s_acked == qp->s_tail) | 1265 | if (qp->s_acked == qp->s_tail) |
1266 | goto bail; | 1266 | goto bail; |
1267 | if (qp->s_flags & QIB_S_WAIT_RNR) | 1267 | if (qp->s_flags & QIB_S_WAIT_RNR) |
@@ -1276,7 +1276,7 @@ static int do_rc_ack(struct rvt_qp *qp, u32 aeth, u32 psn, int opcode, | |||
1276 | /* The last valid PSN is the previous PSN. */ | 1276 | /* The last valid PSN is the previous PSN. */ |
1277 | update_last_psn(qp, psn - 1); | 1277 | update_last_psn(qp, psn - 1); |
1278 | 1278 | ||
1279 | ibp->n_rc_resends += (qp->s_psn - psn) & QIB_PSN_MASK; | 1279 | ibp->rvp.n_rc_resends += (qp->s_psn - psn) & QIB_PSN_MASK; |
1280 | 1280 | ||
1281 | reset_psn(qp, psn); | 1281 | reset_psn(qp, psn); |
1282 | 1282 | ||
@@ -1297,7 +1297,7 @@ static int do_rc_ack(struct rvt_qp *qp, u32 aeth, u32 psn, int opcode, | |||
1297 | switch ((aeth >> QIB_AETH_CREDIT_SHIFT) & | 1297 | switch ((aeth >> QIB_AETH_CREDIT_SHIFT) & |
1298 | QIB_AETH_CREDIT_MASK) { | 1298 | QIB_AETH_CREDIT_MASK) { |
1299 | case 0: /* PSN sequence error */ | 1299 | case 0: /* PSN sequence error */ |
1300 | ibp->n_seq_naks++; | 1300 | ibp->rvp.n_seq_naks++; |
1301 | /* | 1301 | /* |
1302 | * Back up to the responder's expected PSN. | 1302 | * Back up to the responder's expected PSN. |
1303 | * Note that we might get a NAK in the middle of an | 1303 | * Note that we might get a NAK in the middle of an |
@@ -1310,17 +1310,17 @@ static int do_rc_ack(struct rvt_qp *qp, u32 aeth, u32 psn, int opcode, | |||
1310 | 1310 | ||
1311 | case 1: /* Invalid Request */ | 1311 | case 1: /* Invalid Request */ |
1312 | status = IB_WC_REM_INV_REQ_ERR; | 1312 | status = IB_WC_REM_INV_REQ_ERR; |
1313 | ibp->n_other_naks++; | 1313 | ibp->rvp.n_other_naks++; |
1314 | goto class_b; | 1314 | goto class_b; |
1315 | 1315 | ||
1316 | case 2: /* Remote Access Error */ | 1316 | case 2: /* Remote Access Error */ |
1317 | status = IB_WC_REM_ACCESS_ERR; | 1317 | status = IB_WC_REM_ACCESS_ERR; |
1318 | ibp->n_other_naks++; | 1318 | ibp->rvp.n_other_naks++; |
1319 | goto class_b; | 1319 | goto class_b; |
1320 | 1320 | ||
1321 | case 3: /* Remote Operation Error */ | 1321 | case 3: /* Remote Operation Error */ |
1322 | status = IB_WC_REM_OP_ERR; | 1322 | status = IB_WC_REM_OP_ERR; |
1323 | ibp->n_other_naks++; | 1323 | ibp->rvp.n_other_naks++; |
1324 | class_b: | 1324 | class_b: |
1325 | if (qp->s_last == qp->s_acked) { | 1325 | if (qp->s_last == qp->s_acked) { |
1326 | qib_send_complete(qp, wqe, status); | 1326 | qib_send_complete(qp, wqe, status); |
@@ -1371,7 +1371,7 @@ static void rdma_seq_err(struct rvt_qp *qp, struct qib_ibport *ibp, u32 psn, | |||
1371 | wqe = do_rc_completion(qp, wqe, ibp); | 1371 | wqe = do_rc_completion(qp, wqe, ibp); |
1372 | } | 1372 | } |
1373 | 1373 | ||
1374 | ibp->n_rdma_seq++; | 1374 | ibp->rvp.n_rdma_seq++; |
1375 | qp->r_flags |= QIB_R_RDMAR_SEQ; | 1375 | qp->r_flags |= QIB_R_RDMAR_SEQ; |
1376 | qib_restart_rc(qp, qp->s_last_psn + 1, 0); | 1376 | qib_restart_rc(qp, qp->s_last_psn + 1, 0); |
1377 | if (list_empty(&qp->rspwait)) { | 1377 | if (list_empty(&qp->rspwait)) { |
@@ -1643,7 +1643,7 @@ static int qib_rc_rcv_error(struct qib_other_headers *ohdr, | |||
1643 | * Don't queue the NAK if we already sent one. | 1643 | * Don't queue the NAK if we already sent one. |
1644 | */ | 1644 | */ |
1645 | if (!qp->r_nak_state) { | 1645 | if (!qp->r_nak_state) { |
1646 | ibp->n_rc_seqnak++; | 1646 | ibp->rvp.n_rc_seqnak++; |
1647 | qp->r_nak_state = IB_NAK_PSN_ERROR; | 1647 | qp->r_nak_state = IB_NAK_PSN_ERROR; |
1648 | /* Use the expected PSN. */ | 1648 | /* Use the expected PSN. */ |
1649 | qp->r_ack_psn = qp->r_psn; | 1649 | qp->r_ack_psn = qp->r_psn; |
@@ -1679,7 +1679,7 @@ static int qib_rc_rcv_error(struct qib_other_headers *ohdr, | |||
1679 | */ | 1679 | */ |
1680 | e = NULL; | 1680 | e = NULL; |
1681 | old_req = 1; | 1681 | old_req = 1; |
1682 | ibp->n_rc_dupreq++; | 1682 | ibp->rvp.n_rc_dupreq++; |
1683 | 1683 | ||
1684 | spin_lock_irqsave(&qp->s_lock, flags); | 1684 | spin_lock_irqsave(&qp->s_lock, flags); |
1685 | 1685 | ||