aboutsummaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/mthca/mthca_av.c
diff options
context:
space:
mode:
authorJack Morgenstein <jackm@mellanox.co.il>2006-07-14 00:23:50 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-07-14 21:53:50 -0700
commit2290d2c9f51d7ee2f45adee79b4d9e080ca15d36 (patch)
tree958365fdc298f34de525c7b8211397220e17aef9 /drivers/infiniband/hw/mthca/mthca_av.c
parentde45921535bfc3b1f63b426c2a9739635f864283 (diff)
[PATCH] IB/mthca: fix static rate returned by mthca_ah_query
mthca_ah_query returs the static rate of the address handle in internal mthc format. fix it to use rate encoding from enum ib_rate, which is what users expect. Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il> Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Cc: Roland Dreier <rolandd@cisco.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/infiniband/hw/mthca/mthca_av.c')
-rw-r--r--drivers/infiniband/hw/mthca/mthca_av.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_av.c b/drivers/infiniband/hw/mthca/mthca_av.c
index b12aa03be25..e215041b2db 100644
--- a/drivers/infiniband/hw/mthca/mthca_av.c
+++ b/drivers/infiniband/hw/mthca/mthca_av.c
@@ -303,9 +303,10 @@ int mthca_ah_query(struct ib_ah *ibah, struct ib_ah_attr *attr)
memset(attr, 0, sizeof *attr);
attr->dlid = be16_to_cpu(ah->av->dlid);
attr->sl = be32_to_cpu(ah->av->sl_tclass_flowlabel) >> 28;
- attr->static_rate = ah->av->msg_sr & 0x7;
- attr->src_path_bits = ah->av->g_slid & 0x7F;
attr->port_num = be32_to_cpu(ah->av->port_pd) >> 24;
+ attr->static_rate = mthca_rate_to_ib(dev, ah->av->msg_sr & 0x7,
+ attr->port_num);
+ attr->src_path_bits = ah->av->g_slid & 0x7F;
attr->ah_flags = mthca_ah_grh_present(ah) ? IB_AH_GRH : 0;
if (attr->ah_flags) {