diff mbox

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

Message ID 4DAC3CD5.8000700@dev.mellanox.co.il (mailing list archive)
State Accepted
Delegated to: Alex Netes
Headers show

Commit Message

Hal Rosenstock April 18, 2011, 1:29 p.m. UTC
For base SP0, PortState in SM PortInfo attribute is not used and base SP0
is always "active".

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
---

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

Comments

Alex Netes April 27, 2011, 4:10 p.m. UTC | #1
Hi Hal,

On 09:29 Mon 18 Apr     , Hal Rosenstock wrote:
> 
> For base SP0, PortState in SM PortInfo attribute is not used and base SP0
> is always "active".
> 
> Signed-off-by: Hal Rosenstock <hal@mellanox.com>
> ---

Applied. Thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/opensm/osm_perfmgr.c b/opensm/osm_perfmgr.c
index 6a1fa63..86efde6 100644
--- a/opensm/osm_perfmgr.c
+++ b/opensm/osm_perfmgr.c
@@ -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;
 }