diff options
author | Arthur Jones <arthur.jones@qlogic.com> | 2008-04-17 00:01:12 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2008-04-17 00:01:12 -0400 |
commit | 6ca2abf4c02fb3e35247a985c2b6f5834e995033 (patch) | |
tree | cbf950decc213d2c5f05d72e0a2030dc7794f303 /drivers/infiniband/hw/ipath/ipath_sysfs.c | |
parent | f2ceb4929ab543e54efaadcad215a105df684f36 (diff) |
IB/ipath: Provide I/O bus speeds for diagnostic purposes
Modern I/O buses like PCIe and HT can be configured for multiple speeds
and widths. When an ipath HCA seems to have lower than expected
performance, it is very useful to be able to display what the driver
thinks the bus speed is.
Signed-off-by: Dave Olson <dave.olson@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_sysfs.c')
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_sysfs.c | 11 |
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 | ||
166 | static 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 | |||
166 | static ssize_t show_lmc(struct device *dev, | 175 | static 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); | |||
1011 | static DEVICE_ATTR(rx_pol_inv, S_IWUSR, NULL, store_rx_pol_inv); | 1020 | static DEVICE_ATTR(rx_pol_inv, S_IWUSR, NULL, store_rx_pol_inv); |
1012 | static DEVICE_ATTR(led_override, S_IWUSR, NULL, store_led_override); | 1021 | static DEVICE_ATTR(led_override, S_IWUSR, NULL, store_led_override); |
1013 | static DEVICE_ATTR(logged_errors, S_IRUGO, show_logged_errs, NULL); | 1022 | static DEVICE_ATTR(logged_errors, S_IRUGO, show_logged_errs, NULL); |
1023 | static DEVICE_ATTR(localbus_info, S_IRUGO, show_localbus_info, NULL); | ||
1014 | static DEVICE_ATTR(jint_max_packets, S_IWUSR | S_IRUGO, | 1024 | static 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); |
1016 | static DEVICE_ATTR(jint_idle_ticks, S_IWUSR | S_IRUGO, | 1026 | static 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 | ||