From: leonidk Date: Sun, 16 Aug 2009 14:23:48 +0000 (+0000) Subject: [IBAL] fix to 2226. cause an asynchronic event to be handled immediately (and not... X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=28d999a0632262342d0c2d42a662aaae44c6ef44;p=~shefty%2Frdma-win.git [IBAL] fix to 2226. cause an asynchronic event to be handled immediately (and not after SMI_POLL_INTERVAL, which is 20 secs) [mlnx: 4651] git-svn-id: svn://openib.tc.cornell.edu/gen1@2359 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86 --- diff --git a/branches/WOF2-1/core/al/al_ci_ca_shared.c b/branches/WOF2-1/core/al/al_ci_ca_shared.c index ae992d77..da867599 100644 --- a/branches/WOF2-1/core/al/al_ci_ca_shared.c +++ b/branches/WOF2-1/core/al/al_ci_ca_shared.c @@ -314,6 +314,7 @@ ci_ca_process_event_cb( if (AL_BASE_TYPE( p_obj->type) == AL_OBJ_TYPE_CI_CA) { pnp_force_event( (struct _al_ci_ca *) p_obj, IB_PNP_LID_CHANGE, p_event_item->event_rec.port_number ); + force_smi_poll(); } break; #endif //CL_KERNEL diff --git a/branches/WOF2-1/core/al/kernel/al_pnp.c b/branches/WOF2-1/core/al/kernel/al_pnp.c index c3026f29..7fe8c365 100644 --- a/branches/WOF2-1/core/al/kernel/al_pnp.c +++ b/branches/WOF2-1/core/al/kernel/al_pnp.c @@ -1332,6 +1332,44 @@ __pnp_process_port_backward( } +/* + *send asynchronous events + */ +static void +__pnp_send_ae( + IN al_ci_ca_t* const p_ci_ca ) +{ + int ci, cnt, i; + al_pnp_ca_event_t event_rec; + al_ae_info_t ae[MAX_AE]; /* pending Asynchronic Events */ + + if (!p_ci_ca->cnt) + return; + + /* copy events in temp array */ + ci_ca_lock_attr( p_ci_ca ); + cnt = p_ci_ca->cnt; + ci = p_ci_ca->ci; + for (i=0; iae[ci]; + if ( ++ci >= MAX_AE ) + ci = 0; + } + cnt = p_ci_ca->cnt; + p_ci_ca->cnt = 0; + p_ci_ca->ci = ci; + ci_ca_unlock_attr( p_ci_ca ); + + event_rec.p_ci_ca = p_ci_ca; + for (i=0; icnt) - return; - - /* copy events in temp array */ - ci_ca_lock_attr( p_ci_ca ); - cnt = p_ci_ca->cnt; - ci = p_ci_ca->ci; - for (i=0; iae[ci]; - if ( ++ci >= MAX_AE ) - ci = 0; - } - cnt = p_ci_ca->cnt; - p_ci_ca->cnt = 0; - p_ci_ca->ci = ci; - ci_ca_unlock_attr( p_ci_ca ); - - for (i=0; i