aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core/device.c
diff options
context:
space:
mode:
authorMatan Barak <matanb@mellanox.com>2015-06-11 16:35:24 +0300
committerDoug Ledford <dledford@redhat.com>2015-06-12 14:49:10 -0400
commit24306dc66149020c59a07b64e2a325af59ee7d10 (patch)
tree64674f4a705bddddf4902f10381eaf5817caa825 /drivers/infiniband/core/device.c
parentIB/core: Extend ib_uverbs_create_cq (diff)
downloadlinux-dev-24306dc66149020c59a07b64e2a325af59ee7d10.tar.xz
linux-dev-24306dc66149020c59a07b64e2a325af59ee7d10.zip
IB/core: Add timestamp_mask and hca_core_clock to query_device
In order to expose timestamp we need to expose two new attributes in query_device to be used for CQ completion time-stamping: timestamp_mask - how many bits are valid in the timestamp, where timestamp values could be 64bits the most. hca_core_clock - timestamp is given in HW cycles, the frequency in KHZ units of the HCA, necessary in order to convert cycles to seconds. This is added both to ib_query_device and its respective uverbs counterpart. 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/device.c')
-rw-r--r--drivers/infiniband/core/device.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c
index 8d07c12ab718..568cb41be904 100644
--- a/drivers/infiniband/core/device.c
+++ b/drivers/infiniband/core/device.c
@@ -539,6 +539,8 @@ EXPORT_SYMBOL(ib_dispatch_event);
int ib_query_device(struct ib_device *device,
struct ib_device_attr *device_attr)
{
+ memset(device_attr, 0, sizeof(*device_attr));
+
return device->query_device(device, device_attr);
}
EXPORT_SYMBOL(ib_query_device);