Commit 23667546 authored by Dennis Dalessandro's avatar Dennis Dalessandro Committed by Doug Ledford

IB/qib: Support query gid in rdmavt

Query gid is in rdmavt, but still relies on the driver to maintain the
guid table. Add the necessary driver call back and remove the existing
verb handler.
Reviewed-by: default avatarHarish Chegondi <harish.chegondi@intel.com>
Signed-off-by: default avatarDennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 8e4c0666
......@@ -1421,28 +1421,20 @@ static int qib_modify_port(struct ib_device *ibdev, u8 port,
return 0;
}
static int qib_query_gid(struct ib_device *ibdev, u8 port,
int index, union ib_gid *gid)
static int qib_get_guid_be(struct rvt_dev_info *rdi, struct rvt_ibport *rvp,
int guid_index, __be64 *guid)
{
struct qib_devdata *dd = dd_from_ibdev(ibdev);
int ret = 0;
if (!port || port > dd->num_pports)
ret = -EINVAL;
else {
struct qib_ibport *ibp = to_iport(ibdev, port);
struct qib_pportdata *ppd = ppd_from_ibp(ibp);
struct qib_ibport *ibp = container_of(rvp, struct qib_ibport, rvp);
struct qib_pportdata *ppd = ppd_from_ibp(ibp);
gid->global.subnet_prefix = ibp->rvp.gid_prefix;
if (index == 0)
gid->global.interface_id = ppd->guid;
else if (index < QIB_GUIDS_PER_PORT)
gid->global.interface_id = ibp->guids[index - 1];
else
ret = -EINVAL;
}
if (guid_index == 0)
*guid = ppd->guid;
else if (guid_index < QIB_GUIDS_PER_PORT)
*guid = ibp->guids[guid_index - 1];
else
return -EINVAL;
return ret;
return 0;
}
int qib_check_ah(struct ib_device *ibdev, struct ib_ah_attr *ah_attr)
......@@ -1696,7 +1688,6 @@ int qib_register_ib_device(struct qib_devdata *dd)
ibdev->modify_device = qib_modify_device;
ibdev->query_port = qib_query_port;
ibdev->modify_port = qib_modify_port;
ibdev->query_gid = qib_query_gid;
ibdev->process_mad = qib_process_mad;
ibdev->get_port_immutable = qib_port_immutable;
......@@ -1727,6 +1718,7 @@ int qib_register_ib_device(struct qib_devdata *dd)
dd->verbs_dev.rdi.driver_f.get_pmtu_from_attr = get_pmtu_from_attr;
dd->verbs_dev.rdi.dparms.max_rdma_atomic = QIB_MAX_RDMA_ATOMIC;
dd->verbs_dev.rdi.driver_f.get_guid_be = qib_get_guid_be;
dd->verbs_dev.rdi.dparms.lkey_table_size = qib_lkey_table_size;
dd->verbs_dev.rdi.dparms.qp_table_size = ib_qib_qp_table_size;
dd->verbs_dev.rdi.dparms.qpn_start = 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment