summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/qib/qib_verbs.c
diff options
context:
space:
mode:
authorMatan Barak2015-06-11 15:35:25 +0200
committerDoug Ledford2015-06-12 20:49:10 +0200
commit2528e33e680921d95092f83c4a64046744f111b3 (patch)
treec1376e9e5370c13a8f1f47ed9e4ecc2188b133f1 /drivers/infiniband/hw/qib/qib_verbs.c
parentIB/core: Add timestamp_mask and hca_core_clock to query_device (diff)
downloadkernel-qcow2-linux-2528e33e680921d95092f83c4a64046744f111b3.tar.gz
kernel-qcow2-linux-2528e33e680921d95092f83c4a64046744f111b3.tar.xz
kernel-qcow2-linux-2528e33e680921d95092f83c4a64046744f111b3.zip
IB/core: Pass hardware specific data in query_device
Vendors should be able to pass vendor specific data to/from user-space via query_device uverb. In order to do this, we need to pass the vendors' specific udata. Signed-off-by: Matan Barak <matanb@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/qib/qib_verbs.c')
-rw-r--r--drivers/infiniband/hw/qib/qib_verbs.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/qib/qib_verbs.c b/drivers/infiniband/hw/qib/qib_verbs.c
index dba1c92f1a54..e1dad4558ed1 100644
--- a/drivers/infiniband/hw/qib/qib_verbs.c
+++ b/drivers/infiniband/hw/qib/qib_verbs.c
@@ -1550,12 +1550,14 @@ full:
}
}
-static int qib_query_device(struct ib_device *ibdev,
- struct ib_device_attr *props)
+static int qib_query_device(struct ib_device *ibdev, struct ib_device_attr *props,
+ struct ib_udata *uhw)
{
struct qib_devdata *dd = dd_from_ibdev(ibdev);
struct qib_ibdev *dev = to_idev(ibdev);
+ if (uhw->inlen || uhw->outlen)
+ return -EINVAL;
memset(props, 0, sizeof(*props));
props->device_cap_flags = IB_DEVICE_BAD_PKEY_CNTR |