aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorIra Weiny <ira.weiny@intel.com>2016-06-15 02:21:56 -0400
committerDoug Ledford <dledford@redhat.com>2016-06-23 12:08:33 -0400
commit5fa76c20458518ed6181adddef2e31c5afc0745c (patch)
tree7a89109008cb97c1f26e66a44de22214b0f124eb /drivers
parent5edb56491d4812c42175980759da53388e5d86f5 (diff)
IB/core: Add get FW version string to the core
Allow for a common core function to get firmware version strings from the individual devices. In later patches this format can then then be used to pass a properly formated version string through the IPoIB layer. The problem with the current code in the IPoIB layer is that it is specific to certain hardware types. Furthermore, this gives us a common function through which the core can provide a common sysfs entry. Eventually we may want to remove the sysfs export but this provides for user space backwards compatibility. Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/infiniband/core/device.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c
index 5c155fa91eec..760ef603a468 100644
--- a/drivers/infiniband/core/device.c
+++ b/drivers/infiniband/core/device.c
@@ -311,6 +311,15 @@ static int read_port_immutable(struct ib_device *device)
311 return 0; 311 return 0;
312} 312}
313 313
314void ib_get_device_fw_str(struct ib_device *dev, char *str, size_t str_len)
315{
316 if (dev->get_dev_fw_str)
317 dev->get_dev_fw_str(dev, str, str_len);
318 else
319 str[0] = '\0';
320}
321EXPORT_SYMBOL(ib_get_device_fw_str);
322
314/** 323/**
315 * ib_register_device - Register an IB device with IB core 324 * ib_register_device - Register an IB device with IB core
316 * @device:Device to register 325 * @device:Device to register