summaryrefslogtreecommitdiff
path: root/drivers/infiniband/core
diff options
context:
space:
mode:
authorMatan Barak <matanb@mellanox.com>2015-06-11 16:35:25 +0300
committerDoug Ledford <dledford@redhat.com>2015-06-12 21:49:10 +0300
commit2528e33e680921d95092f83c4a64046744f111b3 (patch)
treec1376e9e5370c13a8f1f47ed9e4ecc2188b133f1 /drivers/infiniband/core
parent24306dc66149020c59a07b64e2a325af59ee7d10 (diff)
downloadlinux-2528e33e680921d95092f83c4a64046744f111b3.tar.xz
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/core')
-rw-r--r--drivers/infiniband/core/device.c4
-rw-r--r--drivers/infiniband/core/uverbs_cmd.c2
2 files changed, 4 insertions, 2 deletions
diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c
index 568cb41be904..694bd669b2d8 100644
--- a/drivers/infiniband/core/device.c
+++ b/drivers/infiniband/core/device.c
@@ -539,9 +539,11 @@ EXPORT_SYMBOL(ib_dispatch_event);
int ib_query_device(struct ib_device *device,
struct ib_device_attr *device_attr)
{
+ struct ib_udata uhw = {.outlen = 0, .inlen = 0};
+
memset(device_attr, 0, sizeof(*device_attr));
- return device->query_device(device, device_attr);
+ return device->query_device(device, device_attr, &uhw);
}
EXPORT_SYMBOL(ib_query_device);
diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c
index 11ee298bb26b..bbb02ffe87df 100644
--- a/drivers/infiniband/core/uverbs_cmd.c
+++ b/drivers/infiniband/core/uverbs_cmd.c
@@ -3428,7 +3428,7 @@ int ib_uverbs_ex_query_device(struct ib_uverbs_file *file,
memset(&attr, 0, sizeof(attr));
- err = device->query_device(device, &attr);
+ err = device->query_device(device, &attr, uhw);
if (err)
return err;