[ofa-general] [PATCH] opensm: disable switch ports only

Sasha Khapyorsky sashak at voltaire.com
Tue Nov 18 04:53:25 PST 2008


When "babbling port" policy is on disable switch ports even when trap
source is endport. This will allow to handle disable ports remotely
(with ibportstate, etc.).

Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
---
 opensm/opensm/osm_trap_rcv.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/opensm/opensm/osm_trap_rcv.c b/opensm/opensm/osm_trap_rcv.c
index 5de283b..07c5183 100644
--- a/opensm/opensm/osm_trap_rcv.c
+++ b/opensm/opensm/osm_trap_rcv.c
@@ -239,6 +239,10 @@ static int disable_port(osm_sm_t *sm, osm_physp_t *p)
 	ib_port_info_t *pi = (ib_port_info_t *)payload;
 	int ret;
 
+	/* in case of endport - disable switch's peer port */
+	if (osm_node_get_type(p->p_node) != IB_NODE_TYPE_SWITCH)
+		p = p->p_remote_physp;
+
 	/* If trap 131, might want to disable peer port if available */
 	/* but peer port has been observed not to respond to SM requests */
 
-- 
1.6.0.3.517.g759a




More information about the general mailing list