IB/qib: Remove qib_query_qp function
authorHarish Chegondi <harish.chegondi@intel.com>
Fri, 22 Jan 2016 21:08:01 +0000 (13:08 -0800)
committerDoug Ledford <dledford@redhat.com>
Fri, 11 Mar 2016 01:37:30 +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/infiniband/hw/qib/qib_qp.c
drivers/infiniband/hw/qib/qib_verbs.c
drivers/infiniband/hw/qib/qib_verbs.h

index 685b0bb4fe777ab163b69ad2f1340dd6f2663c50..ce9002f6e7a2424e5fe9654609007a938470c1f8 100644 (file)
@@ -804,56 +804,6 @@ bail:
        return ret;
 }
 
-int qib_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 = qp->r_psn & QIB_PSN_MASK;
-       attr->sq_psn = qp->s_next_psn & QIB_PSN_MASK;
-       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;
-}
-
 /**
  * qib_compute_aeth - compute the AETH (syndrome + MSN)
  * @qp: the queue pair to compute the AETH for
index cbf5f88af882bafb89f8df58ef8c5ea12617ba68..8b97ca1787f6d43994297bbbd1acd0d891c3f3bf 100644 (file)
@@ -1760,7 +1760,7 @@ int qib_register_ib_device(struct qib_devdata *dd)
        ibdev->destroy_srq = qib_destroy_srq;
        ibdev->create_qp = NULL;
        ibdev->modify_qp = qib_modify_qp;
-       ibdev->query_qp = qib_query_qp;
+       ibdev->query_qp = NULL;
        ibdev->destroy_qp = qib_destroy_qp;
        ibdev->post_send = NULL;
        ibdev->post_recv = NULL;
@@ -1814,6 +1814,7 @@ int qib_register_ib_device(struct qib_devdata *dd)
        dd->verbs_dev.rdi.dparms.qpn_res_end = QIB_KD_QP; /* Reserve one QP */
        dd->verbs_dev.rdi.dparms.qpn_inc = 1;
        dd->verbs_dev.rdi.dparms.qos_shift = 1;
+       dd->verbs_dev.rdi.dparms.psn_mask = QIB_PSN_MASK;
        dd->verbs_dev.rdi.dparms.nports = dd->num_pports;
        dd->verbs_dev.rdi.dparms.npkeys = qib_get_npkeys(dd);
        dd->verbs_dev.rdi.dparms.node = dd->assigned_node_id;
index e3610df1d8e3706d5ca6dc34ad73ee9856f9f3c4..34f778424f616d8b294634dd4538b47af58704c3 100644 (file)
@@ -369,9 +369,6 @@ int qib_error_qp(struct rvt_qp *qp, enum ib_wc_status err);
 
 int qib_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
                  int attr_mask, struct ib_udata *udata);
-
-int qib_query_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
-                int attr_mask, struct ib_qp_init_attr *init_attr);
 /*
  * Functions provided by qib driver for rdmavt to use
  */