@@ -182,6 +182,7 @@ typedef struct osm_pi_context {
boolean_t set_method;
boolean_t light_sweep;
boolean_t active_transition;
+ boolean_t client_rereg;
} osm_pi_context_t;
/*********/
@@ -1043,9 +1043,12 @@ static int lid_mgr_set_physp_pi(IN osm_lid_mgr_t * p_mgr,
"Setting client rereg on %s, port %d\n",
p_port->p_node->print_desc, p_port->p_physp->port_num);
ib_port_info_set_client_rereg(p_pi, 1);
+ context.pi_context.client_rereg = TRUE;
send_set = TRUE;
- } else
+ } else {
ib_port_info_set_client_rereg(p_pi, 0);
+ context.pi_context.client_rereg = FALSE;
+ }
/* We need to send the PortInfo Set request with the new sm_lid
in the following cases:
@@ -451,6 +451,7 @@ Send:
context.pi_context.port_guid = osm_physp_get_port_guid(p_physp);
context.pi_context.set_method = TRUE;
context.pi_context.light_sweep = FALSE;
+ context.pi_context.client_rereg = FALSE;
/* We need to send the PortInfoSet request with the new sm_lid
in the following cases:
@@ -307,6 +307,7 @@ static void ni_rcv_get_port_info(IN osm_sm_t * sm, IN osm_node_t * node,
context.pi_context.set_method = FALSE;
context.pi_context.light_sweep = FALSE;
context.pi_context.active_transition = FALSE;
+ context.pi_context.client_rereg = FALSE;
for (; port < num_ports; port++) {
status = osm_req_get(sm, osm_physp_get_dr_path_ptr(physp),
@@ -253,6 +253,7 @@ pkey_mgr_enforce_partition(IN osm_log_t * p_log, osm_sm_t * sm,
context.pi_context.set_method = TRUE;
context.pi_context.light_sweep = FALSE;
context.pi_context.active_transition = FALSE;
+ context.pi_context.client_rereg = FALSE;
status = osm_req_set(sm, osm_physp_get_dr_path_ptr(p_physp),
payload, sizeof(payload),
@@ -566,10 +566,12 @@ void osm_pi_rcv_process(IN void *context, IN void *data)
/* On receipt of client reregister, clear the reregister bit so
reregistering won't be sent again and again */
- if (p_context->set_method && ib_port_info_get_client_rereg(p_pi)) {
+ if (p_context->set_method &&
+ (ib_port_info_get_client_rereg(p_pi) || p_context->client_rereg)) {
OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
"Client reregister received on response\n");
ib_port_info_set_client_rereg(p_pi, 0);
+ p_context->client_rereg = FALSE;
}
/*
@@ -186,6 +186,7 @@ static void state_mgr_get_remote_port_info(IN osm_sm_t * sm,
mad_context.pi_context.set_method = FALSE;
mad_context.pi_context.light_sweep = TRUE;
mad_context.pi_context.active_transition = FALSE;
+ mad_context.pi_context.client_rereg = FALSE;
/* note that with some negative logic - if the query failed it means
* that there is no point in going to heavy sweep */
@@ -241,6 +241,7 @@ static int disable_port(osm_sm_t *sm, osm_physp_t *p)
context.pi_context.set_method = TRUE;
context.pi_context.light_sweep = FALSE;
context.pi_context.active_transition = FALSE;
+ context.pi_context.client_rereg = FALSE;
if (osm_node_get_type(p->p_node) == IB_NODE_TYPE_SWITCH &&
osm_physp_get_port_num(p) != 0) {
physp0 = osm_node_get_physp_ptr(p->p_node, 0);