From: Hal Rosenstock <[email protected]> There might be a scenario where port's link physical state is LinkUp, but port's peer doesn't answer to SMPs. In this case we will move the port to LinkDown.
Signed-off-by: Daniel Klein <[email protected]> Signed-off-by: Vladimir Koushnir <[email protected]> Signed-off-by: Alex Netes <[email protected]> Signed-off-by: Hal Rosenstock <[email protected]> --- opensm/osm_link_mgr.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/opensm/osm_link_mgr.c b/opensm/osm_link_mgr.c index 8301643..8733329 100644 --- a/opensm/osm_link_mgr.c +++ b/opensm/osm_link_mgr.c @@ -484,7 +484,7 @@ Exit: static int link_mgr_process_node(osm_sm_t * sm, IN osm_node_t * p_node, IN const uint8_t link_state) { - osm_physp_t *p_physp; + osm_physp_t *p_physp, *p_physp_remote; uint32_t i, num_physp; int ret = 0; uint8_t current_state; @@ -517,6 +517,19 @@ static int link_mgr_process_node(osm_sm_t * sm, IN osm_node_t * p_node, continue; /* + Set PortState to DOWN in case Remote Physical Port is + unreachable. We have to check this for all ports, except + port zero. + */ + p_physp_remote = osm_physp_get_remote(p_physp); + if ((i != 0) && (!p_physp_remote || + !osm_physp_is_valid(p_physp_remote))) { + if (current_state != IB_LINK_INIT) + link_mgr_set_physp_pi(sm, p_physp, IB_LINK_DOWN); + continue; + } + + /* Normally we only send state update if state is lower then required state. However, we need to send update if no state change required. -- 1.7.11.2 -- 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
