Commit 2d092e11 authored by Dennis Dalessandro's avatar Dennis Dalessandro Committed by Doug Ledford

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: default avatarMike Marciniszyn <mike.marciniszyn@intel.com>
Reviewed-by: default avatarIra Weiny <ira.weiny@intel.com>
Signed-off-by: default avatarDennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 30588643
...@@ -157,6 +157,27 @@ static int rvt_query_pkey(struct ib_device *ibdev, u8 port, u16 index, ...@@ -157,6 +157,27 @@ static int rvt_query_pkey(struct ib_device *ibdev, u8 port, u16 index,
return 0; 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 * Check driver override. If driver passes a value use it, otherwise we use our
* own value. * own value.
...@@ -175,6 +196,7 @@ int rvt_register_device(struct rvt_dev_info *rdi) ...@@ -175,6 +196,7 @@ int rvt_register_device(struct rvt_dev_info *rdi)
CHECK_DRIVER_OVERRIDE(rdi, query_port); CHECK_DRIVER_OVERRIDE(rdi, query_port);
CHECK_DRIVER_OVERRIDE(rdi, modify_port); CHECK_DRIVER_OVERRIDE(rdi, modify_port);
CHECK_DRIVER_OVERRIDE(rdi, query_pkey); CHECK_DRIVER_OVERRIDE(rdi, query_pkey);
CHECK_DRIVER_OVERRIDE(rdi, query_gid);
/* DMA Operations */ /* DMA Operations */
rdi->ibdev.dma_ops = rdi->ibdev.dma_ops =
......
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