mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 17/29v2] A couple of IB core bug fixes
@ 2005-07-11 20:29 Hal Rosenstock
  0 siblings, 0 replies; only message in thread
From: Hal Rosenstock @ 2005-07-11 20:29 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, openib-general

Replace be32_to_cpup with be32_to_cpu and fix bug referencing pointer 
rather than value in ib_create_ah_from_wc().

Signed-off-by: Tom Duffy <tduffy@sun.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Hal Rosenstock <halr@voltaire.com>

This patch depends on patch 16/29.

-- 
 agent.c |    8 ++++--
 verbs.c |    2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)
diff -uprN linux-2.6.13-rc2-mm1-16/drivers/infiniband/core/agent.c linux-2.6.13-rc2-mm1-17/drivers/infiniband/core/agent.c
-- linux-2.6.13-rc2-mm1-16/drivers/infiniband/core/agent.c	2005-07-09 13:22:55.000000000 -0400
+++ linux-2.6.13-rc2-mm1-17/drivers/infiniband/core/agent.c	2005-07-10 11:50:26.000000000 -0400
@@ -156,10 +156,10 @@ static int agent_mad_send(struct ib_mad_
 			/* Should sgid be looked up ? */
 			ah_attr.grh.sgid_index = 0;
 			ah_attr.grh.hop_limit = grh->hop_limit;
-			ah_attr.grh.flow_label = be32_to_cpup(
-				&grh->version_tclass_flow)  & 0xfffff;
-			ah_attr.grh.traffic_class = (be32_to_cpup(
-				&grh->version_tclass_flow) >> 20) & 0xff;
+			ah_attr.grh.flow_label = be32_to_cpu(
+				grh->version_tclass_flow)  & 0xfffff;
+			ah_attr.grh.traffic_class = (be32_to_cpu(
+				grh->version_tclass_flow) >> 20) & 0xff;
 			memcpy(ah_attr.grh.dgid.raw,
 			       grh->sgid.raw,
 			       sizeof(ah_attr.grh.dgid));
diff -uprN linux-2.6.13-rc2-mm1-16/drivers/infiniband/core/verbs.c linux-2.6.13-rc2-mm1-17/drivers/infiniband/core/verbs.c
-- linux-2.6.13-rc2-mm1-16/drivers/infiniband/core/verbs.c	2005-07-10 11:43:44.000000000 -0400
+++ linux-2.6.13-rc2-mm1-17/drivers/infiniband/core/verbs.c	2005-07-10 11:50:26.000000000 -0400
@@ -113,7 +113,7 @@ struct ib_ah *ib_create_ah_from_wc(struc
 			return ERR_PTR(ret);
 
 		ah_attr.grh.sgid_index = (u8) gid_index;
-		flow_class = be32_to_cpu(&grh->version_tclass_flow);
+		flow_class = be32_to_cpu(grh->version_tclass_flow);
 		ah_attr.grh.flow_label = flow_class & 0xFFFFF;
 		ah_attr.grh.traffic_class = (flow_class >> 20) & 0xFF;
 		ah_attr.grh.hop_limit = grh->hop_limit;



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-07-11 20:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-11 20:29 [PATCH 17/29v2] A couple of IB core bug fixes Hal Rosenstock

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome