summaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/qib
diff options
context:
space:
mode:
authorHarish Chegondi <harish.chegondi@intel.com>2016-01-22 20:56:21 (GMT)
committerDoug Ledford <dledford@redhat.com>2016-03-11 01:37:22 (GMT)
commit76fec3e08c1205c4b57bd934727cbbf7223b8dac (patch)
treedcb041569f7a2d01215bcc71efbd573822553752 /drivers/infiniband/hw/qib
parentcd18201f5ec8b04a8eb9ef3f3b559cba55955598 (diff)
downloadlinux-76fec3e08c1205c4b57bd934727cbbf7223b8dac.tar.xz
IB/qib: Use rdmavt pkey verbs function
Remove qib query pkey function which is no longer needed as this is now being done in rdmavt. The allocation and maintenance of the list still resides in the driver. 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>
Diffstat (limited to 'drivers/infiniband/hw/qib')
-rw-r--r--drivers/infiniband/hw/qib/qib_verbs.c33
1 files changed, 13 insertions, 20 deletions
diff --git a/drivers/infiniband/hw/qib/qib_verbs.c b/drivers/infiniband/hw/qib/qib_verbs.c
index 893d00c..74cb501 100644
--- a/drivers/infiniband/hw/qib/qib_verbs.c
+++ b/drivers/infiniband/hw/qib/qib_verbs.c
@@ -1841,24 +1841,6 @@ unsigned qib_get_pkey(struct qib_ibport *ibp, unsigned index)
return ret;
}
-static int qib_query_pkey(struct ib_device *ibdev, u8 port, u16 index,
- u16 *pkey)
-{
- struct qib_devdata *dd = dd_from_ibdev(ibdev);
- int ret;
-
- if (index >= qib_get_npkeys(dd)) {
- ret = -EINVAL;
- goto bail;
- }
-
- *pkey = qib_get_pkey(to_iport(ibdev, port), index);
- ret = 0;
-
-bail:
- return ret;
-}
-
/**
* qib_alloc_ucontext - allocate a ucontest
* @ibdev: the infiniband device
@@ -1961,7 +1943,7 @@ int qib_register_ib_device(struct qib_devdata *dd)
struct qib_ibdev *dev = &dd->verbs_dev;
struct ib_device *ibdev = &dev->rdi.ibdev;
struct qib_pportdata *ppd = dd->pport;
- unsigned i;
+ unsigned i, ctxt;
int ret;
dev->qp_table_size = ib_qib_qp_table_size;
@@ -2073,7 +2055,7 @@ 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_pkey = qib_query_pkey;
+ ibdev->query_pkey = NULL;
ibdev->query_gid = qib_query_gid;
ibdev->alloc_ucontext = qib_alloc_ucontext;
ibdev->dealloc_ucontext = qib_dealloc_ucontext;
@@ -2131,6 +2113,17 @@ int qib_register_ib_device(struct qib_devdata *dd)
dd->verbs_dev.rdi.flags = (RVT_FLAG_QP_INIT_DRIVER |
RVT_FLAG_CQ_INIT_DRIVER);
dd->verbs_dev.rdi.dparms.lkey_table_size = qib_lkey_table_size;
+ dd->verbs_dev.rdi.dparms.nports = dd->num_pports;
+ dd->verbs_dev.rdi.dparms.npkeys = qib_get_npkeys(dd);
+
+ ppd = dd->pport;
+ for (i = 0; i < dd->num_pports; i++, ppd++) {
+ ctxt = ppd->hw_pidx;
+ rvt_init_port(&dd->verbs_dev.rdi,
+ &ppd->ibport_data.rvp,
+ i,
+ dd->rcd[ctxt]->pkeys);
+ }
ret = rvt_register_device(&dd->verbs_dev.rdi);
if (ret)