aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ipath/ipath_sysfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_sysfs.c')
-rw-r--r--drivers/infiniband/hw/ipath/ipath_sysfs.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_sysfs.c b/drivers/infiniband/hw/ipath/ipath_sysfs.c
index 56dfc8a2344c..bb41c3f6aad3 100644
--- a/drivers/infiniband/hw/ipath/ipath_sysfs.c
+++ b/drivers/infiniband/hw/ipath/ipath_sysfs.c
@@ -163,6 +163,15 @@ static ssize_t show_boardversion(struct device *dev,
163 return scnprintf(buf, PAGE_SIZE, "%s", dd->ipath_boardversion); 163 return scnprintf(buf, PAGE_SIZE, "%s", dd->ipath_boardversion);
164} 164}
165 165
166static ssize_t show_localbus_info(struct device *dev,
167 struct device_attribute *attr,
168 char *buf)
169{
170 struct ipath_devdata *dd = dev_get_drvdata(dev);
171 /* The string printed here is already newline-terminated. */
172 return scnprintf(buf, PAGE_SIZE, "%s", dd->ipath_lbus_info);
173}
174
166static ssize_t show_lmc(struct device *dev, 175static ssize_t show_lmc(struct device *dev,
167 struct device_attribute *attr, 176 struct device_attribute *attr,
168 char *buf) 177 char *buf)
@@ -1011,6 +1020,7 @@ static DEVICE_ATTR(unit, S_IRUGO, show_unit, NULL);
1011static DEVICE_ATTR(rx_pol_inv, S_IWUSR, NULL, store_rx_pol_inv); 1020static DEVICE_ATTR(rx_pol_inv, S_IWUSR, NULL, store_rx_pol_inv);
1012static DEVICE_ATTR(led_override, S_IWUSR, NULL, store_led_override); 1021static DEVICE_ATTR(led_override, S_IWUSR, NULL, store_led_override);
1013static DEVICE_ATTR(logged_errors, S_IRUGO, show_logged_errs, NULL); 1022static DEVICE_ATTR(logged_errors, S_IRUGO, show_logged_errs, NULL);
1023static DEVICE_ATTR(localbus_info, S_IRUGO, show_localbus_info, NULL);
1014static DEVICE_ATTR(jint_max_packets, S_IWUSR | S_IRUGO, 1024static DEVICE_ATTR(jint_max_packets, S_IWUSR | S_IRUGO,
1015 show_jint_max_packets, store_jint_max_packets); 1025 show_jint_max_packets, store_jint_max_packets);
1016static DEVICE_ATTR(jint_idle_ticks, S_IWUSR | S_IRUGO, 1026static DEVICE_ATTR(jint_idle_ticks, S_IWUSR | S_IRUGO,
@@ -1034,6 +1044,7 @@ static struct attribute *dev_attributes[] = {
1034 &dev_attr_rx_pol_inv.attr, 1044 &dev_attr_rx_pol_inv.attr,
1035 &dev_attr_led_override.attr, 1045 &dev_attr_led_override.attr,
1036 &dev_attr_logged_errors.attr, 1046 &dev_attr_logged_errors.attr,
1047 &dev_attr_localbus_info.attr,
1037 NULL 1048 NULL
1038}; 1049};
1039 1050