staging/rdma/hfi1: Remove hfi1_query_qp function
authorHarish Chegondi <harish.chegondi@intel.com>
Tue, 19 Jan 2016 22:44:17 +0000 (14:44 -0800)
committerDoug Ledford <dledford@redhat.com>
Fri, 11 Mar 2016 01:37:45 +0000 (20:37 -0500)
Rely on rvt_query_qp function defined in rdmavt

Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Harish Chegondi <harish.chegondi@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/staging/rdma/hfi1/qp.c
drivers/staging/rdma/hfi1/qp.h
drivers/staging/rdma/hfi1/verbs.c

index c9f246740b255ae2194a284020fd95f8d29a6a22..52723c2bad3775d111bf54f430d882b7cabde2b9 100644 (file)
@@ -220,56 +220,6 @@ void hfi1_modify_qp(struct rvt_qp *qp, struct ib_qp_attr *attr,
        }
 }
 
-int hfi1_query_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
-                 int attr_mask, struct ib_qp_init_attr *init_attr)
-{
-       struct rvt_qp *qp = ibqp_to_rvtqp(ibqp);
-
-       attr->qp_state = qp->state;
-       attr->cur_qp_state = attr->qp_state;
-       attr->path_mtu = qp->path_mtu;
-       attr->path_mig_state = qp->s_mig_state;
-       attr->qkey = qp->qkey;
-       attr->rq_psn = mask_psn(qp->r_psn);
-       attr->sq_psn = mask_psn(qp->s_next_psn);
-       attr->dest_qp_num = qp->remote_qpn;
-       attr->qp_access_flags = qp->qp_access_flags;
-       attr->cap.max_send_wr = qp->s_size - 1;
-       attr->cap.max_recv_wr = qp->ibqp.srq ? 0 : qp->r_rq.size - 1;
-       attr->cap.max_send_sge = qp->s_max_sge;
-       attr->cap.max_recv_sge = qp->r_rq.max_sge;
-       attr->cap.max_inline_data = 0;
-       attr->ah_attr = qp->remote_ah_attr;
-       attr->alt_ah_attr = qp->alt_ah_attr;
-       attr->pkey_index = qp->s_pkey_index;
-       attr->alt_pkey_index = qp->s_alt_pkey_index;
-       attr->en_sqd_async_notify = 0;
-       attr->sq_draining = qp->s_draining;
-       attr->max_rd_atomic = qp->s_max_rd_atomic;
-       attr->max_dest_rd_atomic = qp->r_max_rd_atomic;
-       attr->min_rnr_timer = qp->r_min_rnr_timer;
-       attr->port_num = qp->port_num;
-       attr->timeout = qp->timeout;
-       attr->retry_cnt = qp->s_retry_cnt;
-       attr->rnr_retry = qp->s_rnr_retry_cnt;
-       attr->alt_port_num = qp->alt_ah_attr.port_num;
-       attr->alt_timeout = qp->alt_timeout;
-
-       init_attr->event_handler = qp->ibqp.event_handler;
-       init_attr->qp_context = qp->ibqp.qp_context;
-       init_attr->send_cq = qp->ibqp.send_cq;
-       init_attr->recv_cq = qp->ibqp.recv_cq;
-       init_attr->srq = qp->ibqp.srq;
-       init_attr->cap = attr->cap;
-       if (qp->s_flags & RVT_S_SIGNAL_REQ_WR)
-               init_attr->sq_sig_type = IB_SIGNAL_REQ_WR;
-       else
-               init_attr->sq_sig_type = IB_SIGNAL_ALL_WR;
-       init_attr->qp_type = qp->ibqp.qp_type;
-       init_attr->port_num = qp->port_num;
-       return 0;
-}
-
 /**
  * hfi1_compute_aeth - compute the AETH (syndrome + MSN)
  * @qp: the queue pair to compute the AETH for
index 21af3adbf3e399c8de2610b3630332dd252183ac..36be54771205491c07d5e527165404bfcdcad899 100644 (file)
@@ -71,9 +71,6 @@ static inline void clear_ahg(struct rvt_qp *qp)
        qp->s_ahgidx = -1;
 }
 
-int hfi1_query_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
-                 int attr_mask, struct ib_qp_init_attr *init_attr);
-
 /**
  * hfi1_compute_aeth - compute the AETH (syndrome + MSN)
  * @qp: the queue pair to compute the AETH for
index 68f4045dfa99aa494a08a81f117525b8a32c0eb1..f5cc0b996966c52ff9f04286714b3f76ee6cb76a 100644 (file)
@@ -1517,7 +1517,6 @@ int hfi1_register_ib_device(struct hfi1_devdata *dd)
        ibdev->modify_srq = hfi1_modify_srq;
        ibdev->query_srq = hfi1_query_srq;
        ibdev->destroy_srq = hfi1_destroy_srq;
-       ibdev->query_qp = hfi1_query_qp;
        ibdev->post_srq_recv = hfi1_post_srq_receive;
 
        /* keep process mad in the driver */