diff mbox

[4/7] ibacm: Set SM LID address in network byte order

Message ID CF9C39F99A89134C9CF9C4CCB68B8DDF25CC92EAC2@orsmsx501.amr.corp.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Hefty, Sean March 5, 2011, 12:02 a.m. UTC
None
diff mbox

Patch

diff --git a/src/acm.c b/src/acm.c
index 10680f8..d52e83a 100644
--- a/src/acm.c
+++ b/src/acm.c
@@ -2637,13 +2637,14 @@  static void acm_port_up(struct acm_port *port)
 	port->lid = attr.lid;
 	port->lid_mask = 0xffff - ((1 << attr.lmc) - 1);
 
-	acm_set_dest_addr(&port->sa_dest, ACM_ADDRESS_LID,
-		(uint8_t *) &attr.sm_lid, sizeof(attr.sm_lid));
 	port->sa_dest.av.src_path_bits = 0;
 	port->sa_dest.av.dlid = attr.sm_lid;
 	port->sa_dest.av.sl = attr.sm_sl;
 	port->sa_dest.av.port_num = port->port_num;
 	port->sa_dest.remote_qpn = 1;
+	attr.sm_lid = htons(attr.sm_lid);
+	acm_set_dest_addr(&port->sa_dest, ACM_ADDRESS_LID,
+		(uint8_t *) &attr.sm_lid, sizeof(attr.sm_lid));
 
 	port->sa_dest.ah = ibv_create_ah(port->dev->pd, &port->sa_dest.av);
 	if (!port->sa_dest.ah)