diff options
author | Dennis Dalessandro <dennis.dalessandro@intel.com> | 2016-01-06 20:54:50 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-03-11 04:37:07 +0300 |
commit | 2d092e11744695c30b76fac070c80bb7e1ac9325 (patch) | |
tree | ddb418d0f4d09641e80fc822857989db7718cf06 /drivers/infiniband/sw/rdmavt | |
parent | 30588643f95e1bb1239e2568de7a653722832a5e (diff) | |
download | linux-2d092e11744695c30b76fac070c80bb7e1ac9325.tar.xz |
IB/rdmavt: Add query gid stub
The handler for query gid operates along the same lines as the query pkey
handler. The driver will take care to keep the guid table updated.
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/sw/rdmavt')
-rw-r--r-- | drivers/infiniband/sw/rdmavt/vt.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/infiniband/sw/rdmavt/vt.c b/drivers/infiniband/sw/rdmavt/vt.c index fc5372d75280..e95f19752b46 100644 --- a/drivers/infiniband/sw/rdmavt/vt.c +++ b/drivers/infiniband/sw/rdmavt/vt.c @@ -157,6 +157,27 @@ static int rvt_query_pkey(struct ib_device *ibdev, u8 port, u16 index, return 0; } +/** + * rvt_query_gid - Return a gid from the table + * @ibdev: Verbs IB dev + * @port: Port number + * @index: = Index in table + * @gid: Gid to return + * + * Returns 0 on success + */ +static int rvt_query_gid(struct ib_device *ibdev, u8 port, + int index, union ib_gid *gid) +{ + /* + * Driver is responsible for updating the guid table. Which will be used + * to craft the return value. This will work similar to how query_pkey() + * is being done. + */ + + return -EOPNOTSUPP; +} + /* * Check driver override. If driver passes a value use it, otherwise we use our * own value. @@ -175,6 +196,7 @@ int rvt_register_device(struct rvt_dev_info *rdi) CHECK_DRIVER_OVERRIDE(rdi, query_port); CHECK_DRIVER_OVERRIDE(rdi, modify_port); CHECK_DRIVER_OVERRIDE(rdi, query_pkey); + CHECK_DRIVER_OVERRIDE(rdi, query_gid); /* DMA Operations */ rdi->ibdev.dma_ops = |