IB/qib: Remove ibport and use rdmavt version
[deliverable/linux.git] / drivers / infiniband / hw / qib / qib_rc.c
index 46e6c9765ea6e5c2ec67c64b12575605bf28570c..1e8463de9efc63b1816bc61b843fde2552ed8091 100644 (file)
@@ -760,7 +760,7 @@ void qib_send_rc_ack(struct rvt_qp *qp)
 
 queue_ack:
        if (ib_qib_state_ops[qp->state] & QIB_PROCESS_RECV_OK) {
-               ibp->n_rc_qacks++;
+               this_cpu_inc(*ibp->rvp.rc_qacks);
                qp->s_flags |= QIB_S_ACK_PENDING | QIB_S_RESP_PENDING;
                qp->s_nak_state = qp->r_nak_state;
                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)
 
        ibp = to_iport(qp->ibqp.device, qp->port_num);
        if (wqe->wr.opcode == IB_WR_RDMA_READ)
-               ibp->n_rc_resends++;
+               ibp->rvp.n_rc_resends++;
        else
-               ibp->n_rc_resends += (qp->s_psn - psn) & QIB_PSN_MASK;
+               ibp->rvp.n_rc_resends += (qp->s_psn - psn) & QIB_PSN_MASK;
 
        qp->s_flags &= ~(QIB_S_WAIT_FENCE | QIB_S_WAIT_RDMAR |
                         QIB_S_WAIT_SSN_CREDIT | QIB_S_WAIT_PSN |
@@ -913,7 +913,7 @@ static void rc_timeout(unsigned long arg)
        spin_lock(&qp->s_lock);
        if (qp->s_flags & QIB_S_TIMER) {
                ibp = to_iport(qp->ibqp.device, qp->port_num);
-               ibp->n_rc_timeouts++;
+               ibp->rvp.n_rc_timeouts++;
                qp->s_flags &= ~QIB_S_TIMER;
                del_timer(&qp->s_timer);
                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,
                if (++qp->s_last >= qp->s_size)
                        qp->s_last = 0;
        } else
-               ibp->n_rc_delayed_comp++;
+               this_cpu_inc(*ibp->rvp.rc_delayed_comp);
 
        qp->s_retry = qp->s_retry_cnt;
        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,
 
        switch (aeth >> 29) {
        case 0:         /* ACK */
-               ibp->n_rc_acks++;
+               this_cpu_inc(*ibp->rvp.rc_acks);
                if (qp->s_acked != qp->s_tail) {
                        /*
                         * 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,
                goto bail;
 
        case 1:         /* RNR NAK */
-               ibp->n_rnr_naks++;
+               ibp->rvp.n_rnr_naks++;
                if (qp->s_acked == qp->s_tail)
                        goto bail;
                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,
                /* The last valid PSN is the previous PSN. */
                update_last_psn(qp, psn - 1);
 
-               ibp->n_rc_resends += (qp->s_psn - psn) & QIB_PSN_MASK;
+               ibp->rvp.n_rc_resends += (qp->s_psn - psn) & QIB_PSN_MASK;
 
                reset_psn(qp, psn);
 
@@ -1297,7 +1297,7 @@ static int do_rc_ack(struct rvt_qp *qp, u32 aeth, u32 psn, int opcode,
                switch ((aeth >> QIB_AETH_CREDIT_SHIFT) &
                        QIB_AETH_CREDIT_MASK) {
                case 0: /* PSN sequence error */
-                       ibp->n_seq_naks++;
+                       ibp->rvp.n_seq_naks++;
                        /*
                         * Back up to the responder's expected PSN.
                         * 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,
 
                case 1: /* Invalid Request */
                        status = IB_WC_REM_INV_REQ_ERR;
-                       ibp->n_other_naks++;
+                       ibp->rvp.n_other_naks++;
                        goto class_b;
 
                case 2: /* Remote Access Error */
                        status = IB_WC_REM_ACCESS_ERR;
-                       ibp->n_other_naks++;
+                       ibp->rvp.n_other_naks++;
                        goto class_b;
 
                case 3: /* Remote Operation Error */
                        status = IB_WC_REM_OP_ERR;
-                       ibp->n_other_naks++;
+                       ibp->rvp.n_other_naks++;
 class_b:
                        if (qp->s_last == qp->s_acked) {
                                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,
                wqe = do_rc_completion(qp, wqe, ibp);
        }
 
-       ibp->n_rdma_seq++;
+       ibp->rvp.n_rdma_seq++;
        qp->r_flags |= QIB_R_RDMAR_SEQ;
        qib_restart_rc(qp, qp->s_last_psn + 1, 0);
        if (list_empty(&qp->rspwait)) {
@@ -1643,7 +1643,7 @@ static int qib_rc_rcv_error(struct qib_other_headers *ohdr,
                 * Don't queue the NAK if we already sent one.
                 */
                if (!qp->r_nak_state) {
-                       ibp->n_rc_seqnak++;
+                       ibp->rvp.n_rc_seqnak++;
                        qp->r_nak_state = IB_NAK_PSN_ERROR;
                        /* Use the expected PSN. */
                        qp->r_ack_psn = qp->r_psn;
@@ -1679,7 +1679,7 @@ static int qib_rc_rcv_error(struct qib_other_headers *ohdr,
         */
        e = NULL;
        old_req = 1;
-       ibp->n_rc_dupreq++;
+       ibp->rvp.n_rc_dupreq++;
 
        spin_lock_irqsave(&qp->s_lock, flags);
 
This page took 0.026589 seconds and 5 git commands to generate.