<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.3243" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><SPAN class=114255013-25032009>IBAL start up has by
design two stages.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=114255013-25032009> -
initialization and preparing for getting IBAL PnP events (synchronous on
fdo_start);</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=114255013-25032009> -
completing the start up upon receiving ADD_CA event (asynchronous, after
fdo_start).</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=114255013-25032009></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=114255013-25032009>It means, that IBBUS
driver notifies the completion of the driver start operation before it really
has finished it.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=114255013-25032009>It causes races in
quick HCA disable/enable sequences.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=114255013-25032009></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=114255013-25032009>This patch makes
IBBUS start up synchronous by adding a wait in the first stage till the end of
the second stage.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=114255013-25032009></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Index:
core/al/kernel/al_pnp.c<BR>===================================================================<BR>---
core/al/kernel/al_pnp.c (revision 2055)<BR>+++
core/al/kernel/al_pnp.c (working copy)<BR>@@ -1152,6 +1152,7
@@<BR> cl_status_t cl_status;<BR> al_pnp_ca_event_t *p_event_rec;<BR> ib_ca_attr_t *p_old_ca_attr;<BR>+ uint32_t ref_cnt,
prev_cnt, i;<BR> <BR> AL_ENTER( AL_DBG_PNP );<BR> <BR>@@
-1232,9 +1233,18 @@<BR> }<BR> <BR> /* Queue the event
to the async processing manager. */<BR>- ref_al_obj( &gp_pnp->obj
);<BR>+ ref_cnt = ref_al_obj( &gp_pnp->obj
);<BR> cl_async_proc_queue( gp_async_pnp_mgr,
&p_event_rec->async_item );<BR> <BR>+ /* wait up to 3 seconds
for the end of event propagation <BR>+ It is needed for enabling quick HCA
disable/enable scenarios. */<BR>+ prev_cnt = ref_cnt - 1;<BR>+ for ( i
= 0; i < 30; ++i ) {<BR>+ if (ref_cnt <=
prev_cnt)<BR>+ break;<BR>+ cl_thread_suspend(100);<BR>+ }<BR>+<BR> AL_EXIT(
AL_DBG_PNP );<BR> return
IB_SUCCESS;<BR> }<BR></FONT></DIV></BODY></HTML>