IB/qib: Remove ibport and use rdmavt version
[deliverable/linux.git] / drivers / infiniband / hw / qib / qib_uc.c
index 06a564589c35d1212065cae4e8c77c4ec3647b1c..659ac519bbfc22f66318b66c94e70eaa810163c2 100644 (file)
  *
  * Return 1 if constructed; otherwise, return 0.
  */
-int qib_make_uc_req(struct qib_qp *qp)
+int qib_make_uc_req(struct rvt_qp *qp)
 {
+       struct qib_qp_priv *priv = qp->priv;
        struct qib_other_headers *ohdr;
-       struct qib_swqe *wqe;
+       struct rvt_swqe *wqe;
        unsigned long flags;
        u32 hwords;
        u32 bth0;
@@ -63,7 +64,7 @@ int qib_make_uc_req(struct qib_qp *qp)
                if (qp->s_last == qp->s_head)
                        goto bail;
                /* If DMAs are in progress, we can't flush immediately. */
-               if (atomic_read(&qp->s_dma_busy)) {
+               if (atomic_read(&priv->s_dma_busy)) {
                        qp->s_flags |= QIB_S_WAIT_DMA;
                        goto bail;
                }
@@ -72,9 +73,9 @@ int qib_make_uc_req(struct qib_qp *qp)
                goto done;
        }
 
-       ohdr = &qp->s_hdr->u.oth;
+       ohdr = &priv->s_hdr->u.oth;
        if (qp->remote_ah_attr.ah_flags & IB_AH_GRH)
-               ohdr = &qp->s_hdr->u.l.oth;
+               ohdr = &priv->s_hdr->u.l.oth;
 
        /* header size in 32-bit words LRH+BTH = (8+12)/4. */
        hwords = 5;
@@ -240,7 +241,7 @@ unlock:
  * Called at interrupt level.
  */
 void qib_uc_rcv(struct qib_ibport *ibp, struct qib_ib_header *hdr,
-               int has_grh, void *data, u32 tlen, struct qib_qp *qp)
+               int has_grh, void *data, u32 tlen, struct rvt_qp *qp)
 {
        struct qib_other_headers *ohdr;
        u32 opcode;
@@ -438,7 +439,7 @@ rdma_first:
                        int ok;
 
                        /* Check rkey */
-                       ok = qib_rkey_ok(qp, &qp->r_sge.sge, qp->r_len,
+                       ok = rvt_rkey_ok(qp, &qp->r_sge.sge, qp->r_len,
                                         vaddr, rkey, IB_ACCESS_REMOTE_WRITE);
                        if (unlikely(!ok))
                                goto drop;
@@ -526,7 +527,7 @@ rewind:
        set_bit(QIB_R_REWIND_SGE, &qp->r_aflags);
        qp->r_sge.num_sge = 0;
 drop:
-       ibp->n_pkt_drops++;
+       ibp->rvp.n_pkt_drops++;
        return;
 
 op_err:
This page took 0.02629 seconds and 5 git commands to generate.