diff mbox

opensm/osm_slvl_map_rcv.c: fix port parsing on BE machine

Message ID 20091229150528.GV26940@me (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Sasha Khapyorsky Dec. 29, 2009, 3:05 p.m. UTC
None
diff mbox

Patch

diff --git a/opensm/opensm/osm_slvl_map_rcv.c b/opensm/opensm/osm_slvl_map_rcv.c
index 4f75690..3b24a8e 100644
--- a/opensm/opensm/osm_slvl_map_rcv.c
+++ b/opensm/opensm/osm_slvl_map_rcv.c
@@ -105,10 +105,8 @@  void osm_slvl_rcv_process(IN void *context, IN void *p_data)
 
 	/* in case of a non switch node the attr modifier should be ignored */
 	if (osm_node_get_type(p_node) == IB_NODE_TYPE_SWITCH) {
-		out_port_num =
-		    (uint8_t) cl_ntoh32(p_smp->attr_mod & 0xFF000000);
-		in_port_num =
-		    (uint8_t) cl_ntoh32((p_smp->attr_mod & 0x00FF0000) << 8);
+		out_port_num = cl_ntoh32(p_smp->attr_mod) & 0xff;
+		in_port_num = (cl_ntoh32(p_smp->attr_mod) >> 8) & 0xff;
 		p_physp = osm_node_get_physp_ptr(p_node, out_port_num);
 	} else {
 		p_physp = p_port->p_physp;