Skip to contentSkip to conversation

opensm/osm_perfmgr.c: Don't rely on PortInfo:PortState for base SP0

PATCH In review Hal Rosenstock 2 participants 2 messages Apr 18, 2011 – Apr 27, 2011 1 message not in the archive InfiniBand

lore
Share & tools
lore
#0 lore raw

PATCH 2/2 opensm/osm_perfmgr.c: Don't rely on PortInfo:PortState for base SP0

For base SP0, PortState in SM PortInfo attribute is not used and base SP0 is always "active".

---

opensm/osm_perfmgr.c +4 -0
index 6a1fa63..86efde6 100644
@@ -684,6 +684,10 @@ static unsigned is_sm_port_down(osm_sm_t * sm)
 	}
 	CL_PLOCK_RELEASE(sm->p_lock);
 
+	if (p_port->p_node->sw &&
+	    !ib_switch_info_is_enhanced_port0(&p_port->p_node->sw->switch_info))
+		return 0;	/* base SP0 */
+
 	return osm_physp_get_port_state(p_port->p_physp) == IB_LINK_DOWN;
 }
 

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 4DAC3CD5.8000700-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org