提交 feaeb6e2 编写于 作者: H Harish Chegondi 提交者: Doug Ledford

IB/rdmavt: Add support for rvt_query_device function

With this commit, the drivers using rdmavt need not define query_device
function. But they should fill in the IB device attributes structure
rvt_dev_info.dparms.props
Reviewed-by: NDennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: NHarish Chegondi <harish.chegondi@intel.com>
Signed-off-by: NDoug Ledford <dledford@redhat.com>
上级 fef2efd6
......@@ -68,10 +68,15 @@ static int rvt_query_device(struct ib_device *ibdev,
struct ib_device_attr *props,
struct ib_udata *uhw)
{
struct rvt_dev_info *rdi = ib_to_rvt(ibdev);
if (uhw->inlen || uhw->outlen)
return -EINVAL;
/*
* Return rvt_dev_info.props contents
* Return rvt_dev_info.dparms.props contents
*/
return -EOPNOTSUPP;
*props = rdi->dparms.props;
return 0;
}
static int rvt_modify_device(struct ib_device *device,
......
......@@ -245,7 +245,10 @@ struct rvt_dev_info {
* allocating space for this structure.
*
* The driver will also be responsible for filling in certain members of
* dparms.props
* dparms.props. The driver needs to fill in dparms exactly as it would
* want values reported to a ULP. This will be returned to the caller
* in rdmavt's device. The driver should also therefore refrain from
* modifying this directly after registration with rdmavt.
*/
/* Driver specific properties */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册