The CM tries to modify the port attributes during the cleanup phase of port cep destruction. However, if the stack is being brought down, by the time ib_modify_hca is called, the h_ca handle is invalid.
Signed-off-by: Sean Hefty <[email protected]> --- I can't think of any reason why modification of the port attributes is deferred. Index: al_cm_cep.c =================================================================== --- al_cm_cep.c (revision 2139) +++ al_cm_cep.c (working copy) @@ -2409,6 +2409,7 @@ { cep_agent_t *p_port_cep; KLOCK_QUEUE_HANDLE hdl; + ib_port_attr_mod_t port_attr_mod; AL_ENTER( AL_DBG_CM ); @@ -2433,6 +2434,16 @@ p_port_cep->h_pd = NULL; } + if( p_port_cep->h_ca ) + { + /* Update local port attributes */ + port_attr_mod.cap.cm = FALSE; + ib_modify_ca( p_port_cep->h_ca, p_port_cep->port_num, + IB_CA_MOD_IS_CM_SUPPORTED, &port_attr_mod ); + deref_al_obj( &p_port_cep->h_ca->obj ); + p_port_cep->h_ca = NULL; + } + AL_EXIT( AL_DBG_CM ); } @@ -2447,22 +2458,10 @@ IN al_obj_t *p_obj ) { cep_agent_t *p_port_cep; - ib_port_attr_mod_t port_attr_mod; AL_ENTER( AL_DBG_CM ); p_port_cep = PARENT_STRUCT( p_obj, cep_agent_t, obj ); - - if( p_port_cep->h_ca ) - { - /* Update local port attributes */ - port_attr_mod.cap.cm = FALSE; - ib_modify_ca( p_port_cep->h_ca, p_port_cep->port_num, - IB_CA_MOD_IS_CM_SUPPORTED, &port_attr_mod ); - - deref_al_obj( &p_port_cep->h_ca->obj ); - } - destroy_al_obj( &p_port_cep->obj ); cl_free( p_port_cep ); _______________________________________________ ofw mailing list [email protected] http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw
