summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorMarcel Apfelbaum <marcela@dev.mellanox.co.il>2011-10-04 14:28:23 +0200
committerRoland Dreier <roland@purestorage.com>2011-10-11 20:57:08 +0200
commite36fb88a9a0fb8ac4b87c8ac709214a408de6d97 (patch)
tree51012bbd19e812b80a7a9628b9503f4f8a29ad6f /drivers/infiniband
parentIB: Add new InfiniBand link speeds (diff)
downloadlinux-e36fb88a9a0fb8ac4b87c8ac709214a408de6d97.tar.xz
linux-e36fb88a9a0fb8ac4b87c8ac709214a408de6d97.zip
IPoIB: Handle extended rates in debugfs
Use new function ib_rate_to_mbps() to handle printing rate in debugfs, so that we handle extended rates. Signed-off-by: Marcel Apfelbaum <marcela@dev.mellanox.co.il> Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_fs.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_fs.c b/drivers/infiniband/ulp/ipoib/ipoib_fs.c
index 86eae229dc49..0e2fe4631ba8 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_fs.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_fs.c
@@ -212,16 +212,15 @@ static int ipoib_path_seq_show(struct seq_file *file, void *iter_ptr)
gid_buf, path.pathrec.dlid ? "yes" : "no");
if (path.pathrec.dlid) {
- rate = ib_rate_to_mult(path.pathrec.rate) * 25;
+ rate = ib_rate_to_mbps(path.pathrec.rate);
seq_printf(file,
" DLID: 0x%04x\n"
" SL: %12d\n"
- " rate: %*d%s Gb/sec\n",
+ " rate: %8d.%d Gb/sec\n",
be16_to_cpu(path.pathrec.dlid),
path.pathrec.sl,
- 10 - ((rate % 10) ? 2 : 0),
- rate / 10, rate % 10 ? ".5" : "");
+ rate / 1000, rate % 1000);
}
seq_putc(file, '\n');