Skip to contentSkip to conversation

IB/mthca: fix static rate returned by mthca_ah_query

PATCH New Michael S. Tsirkin 1 participant 1 message Jul 10, 2006

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 IB/mthca: fix static rate returned by mthca_ah_query

Andrew,
this has been out for a couple of days - could you drop this into -mm / push this along to Linus, please?

----- Forwarded message from "Michael S. Tsirkin" <[email protected]> -----

Please review:

git://www.mellanox.co.il/~git/infiniband mst-for-2.6.18

This has the following patch:

IB/mthca: fix static rate returned by mthca_ah_query

--

commit 8b9395d3b67af87ce4c218af06a259a8af246d75

Author: Jack Morgenstein <[email protected]>
Date:   Thu Jul 6 19:33:25 2006 +0300

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.

drivers/infiniband/hw/mthca/mthca_av.c +3 -2
Index: latest/drivers/infiniband/hw/mthca/mthca_av.c
===================================================================
@@ -303,9 +303,10 @@ int mthca_ah_query(struct ib_ah *ibah, s
 	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) {
Signature · 1 line
MST