staging/rdma/hfi1: Use rdmavt pkey verbs function
authorDennis Dalessandro <dennis.dalessandro@intel.com>
Tue, 19 Jan 2016 22:42:50 +0000 (14:42 -0800)
committerDoug Ledford <dledford@redhat.com>
Fri, 11 Mar 2016 01:37:39 +0000 (20:37 -0500)
No need to keep providing the query pkey function. This is now being
done in rdmavt. Remove support from hfi1. The allocation and
maintenance of the list still resides in the driver.

Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/staging/rdma/hfi1/verbs.c

index 11f08ea77559d98e2a462051c0b31deb35ae5722..fa5b9c15215ea274ccb72f9dae3ecb1a253b2712 100644 (file)
@@ -1679,24 +1679,6 @@ unsigned hfi1_get_npkeys(struct hfi1_devdata *dd)
        return ARRAY_SIZE(dd->pport[0].pkeys);
 }
 
-static int query_pkey(struct ib_device *ibdev, u8 port, u16 index,
-                     u16 *pkey)
-{
-       struct hfi1_devdata *dd = dd_from_ibdev(ibdev);
-       int ret;
-
-       if (index >= hfi1_get_npkeys(dd)) {
-               ret = -EINVAL;
-               goto bail;
-       }
-
-       *pkey = hfi1_get_pkey(to_iport(ibdev, port), index);
-       ret = 0;
-
-bail:
-       return ret;
-}
-
 /**
  * alloc_ucontext - allocate a ucontest
  * @ibdev: the infiniband device
@@ -1864,7 +1846,7 @@ int hfi1_register_ib_device(struct hfi1_devdata *dd)
        ibdev->modify_device = modify_device;
        ibdev->query_port = query_port;
        ibdev->modify_port = modify_port;
-       ibdev->query_pkey = query_pkey;
+       ibdev->query_pkey = NULL;
        ibdev->query_gid = query_gid;
        ibdev->alloc_ucontext = alloc_ucontext;
        ibdev->dealloc_ucontext = dealloc_ucontext;