diff options
author | Harish Chegondi <harish.chegondi@intel.com> | 2016-01-22 20:50:36 (GMT) |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-03-11 01:37:20 (GMT) |
commit | feaeb6e26fd15f6531e28f2900e0b59705bfc3d4 (patch) | |
tree | 928114f9e399d2fbc4ceed9fd74232c4a2c38a10 /drivers | |
parent | fef2efd6b4951148cc8dd1df7b3e1ff2f13dd6df (diff) | |
download | linux-feaeb6e26fd15f6531e28f2900e0b59705bfc3d4.tar.xz |
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: 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')
-rw-r--r-- | drivers/infiniband/sw/rdmavt/vt.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/infiniband/sw/rdmavt/vt.c b/drivers/infiniband/sw/rdmavt/vt.c index e75eb3d..f2b6438 100644 --- a/drivers/infiniband/sw/rdmavt/vt.c +++ b/drivers/infiniband/sw/rdmavt/vt.c @@ -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, |