diff options
author | Ralph Campbell <ralph.campbell@qlogic.com> | 2006-05-09 13:50:28 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2006-05-09 13:50:28 -0400 |
commit | d8b9f23b23e080d820e3c0aa5ccd7834c26ebf96 (patch) | |
tree | d6b4b8576ad5df14c24515c55ee8316c252a6ca0 /drivers/infiniband/core | |
parent | 3cd73eedde34c5fd88d62d8523c4260970fdc6fb (diff) |
IB: Fix display of 4-bit port counters in sysfs
The code to display local_link_integrity_errors and
excessive_buffer_overrun_errors in
/sys/class/infiniband/<hca>/ports/<n>/counters/
uses the wrong shift to extract the 4 bit values.
Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/core')
-rw-r--r-- | drivers/infiniband/core/sysfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/core/sysfs.c b/drivers/infiniband/core/sysfs.c index 15121cb5a1f6..21f9282c1b25 100644 --- a/drivers/infiniband/core/sysfs.c +++ b/drivers/infiniband/core/sysfs.c | |||
@@ -336,7 +336,7 @@ static ssize_t show_pma_counter(struct ib_port *p, struct port_attribute *attr, | |||
336 | switch (width) { | 336 | switch (width) { |
337 | case 4: | 337 | case 4: |
338 | ret = sprintf(buf, "%u\n", (out_mad->data[40 + offset / 8] >> | 338 | ret = sprintf(buf, "%u\n", (out_mad->data[40 + offset / 8] >> |
339 | (offset % 4)) & 0xf); | 339 | (4 - (offset % 8))) & 0xf); |
340 | break; | 340 | break; |
341 | case 8: | 341 | case 8: |
342 | ret = sprintf(buf, "%u\n", out_mad->data[40 + offset / 8]); | 342 | ret = sprintf(buf, "%u\n", out_mad->data[40 + offset / 8]); |