<!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><SPAN class=468320916-17032009><FONT face=Arial color=#0000ff
size=2>OK</FONT></SPAN></DIV><BR>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Smith, Stan
[mailto:stan.smith@intel.com] <BR><B>Sent:</B> Tuesday, March 17, 2009 2:08
AM<BR><B>To:</B> Leonid Keller; James Yang<BR><B>Cc:</B>
ofw@lists.openfabrics.org<BR><B>Subject:</B> RE:
[ofw][patch][[ibbus]<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV><SPAN class=447060600-17032009><FONT face=Arial color=#0000ff
size=2>Leo,</FONT></SPAN></DIV>
<DIV><SPAN class=447060600-17032009><FONT face=Arial color=#0000ff
size=2> Please hold off on this patch until I finished the ibbus CA
reference per fabric PDO experiment you asked me to
perform.</FONT></SPAN></DIV>
<DIV><SPAN class=447060600-17032009><FONT face=Arial color=#0000ff
size=2>James has stated this patch is unnecessary if we go down the CA ref /
fabric PDO path.</FONT></SPAN></DIV>
<DIV><SPAN class=447060600-17032009><FONT face=Arial color=#0000ff
size=2>Should have testing wrapped up by EOD Tuesday.</FONT></SPAN></DIV>
<DIV><SPAN class=447060600-17032009><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=447060600-17032009><FONT face=Arial color=#0000ff
size=2>thanks,</FONT></SPAN></DIV>
<DIV><SPAN class=447060600-17032009><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=447060600-17032009><FONT face=Arial color=#0000ff
size=2>stan.</FONT></SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> ofw-bounces@lists.openfabrics.org
[mailto:ofw-bounces@lists.openfabrics.org] <B>On Behalf Of </B>Leonid
Keller<BR><B>Sent:</B> Monday, March 16, 2009 9:22 AM<BR><B>To:</B> James
Yang<BR><B>Cc:</B> ofw@lists.openfabrics.org<BR><B>Subject:</B>
[ofw][patch][[ibbus]<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV><FONT face=Arial size=2><SPAN class=019510716-16032009><FONT face=Arial
size=2><FONT size=2>
<P>[IBBUS] Fix for hibernate in case of several child devices of
IBBUS</P></FONT></FONT></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=019510716-16032009><FONT face=Arial
size=2>Signed-off-by: James Yang </FONT></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Index:
core/bus/kernel/bus_port_mgr.c<BR>===================================================================<BR>---
core/bus/kernel/bus_port_mgr.c (revision 2032)<BR>+++
core/bus/kernel/bus_port_mgr.c (working copy)<BR>@@ -420,13 +420,12
@@<BR> deref_al_obj( &p_ext->h_ca->obj
);<BR> }<BR> <BR>- BUS_TRACE( BUS_DBG_PNP,
("%s Deleted device %s: PDO %p, ext
%p\n",<BR>- p_bfi->whoami,
p_ext->cl_ext.vfptr_pnp_po->identity,<BR>- p_ext->cl_ext.p_self_do,
p_ext ) );<BR>+ BUS_TRACE( BUS_DBG_PNP, ("%s Deleted device
%s: PDO %p, ext
%p\n",<BR>+ p_bfi->whoami,
p_ext->cl_ext.vfptr_pnp_po->identity,<BR>+ p_ext->cl_ext.p_self_do,
p_ext ) );<BR>+ IoDeleteDevice( p_ext->cl_ext.p_self_do
);<BR>+ }<BR> <BR>- IoDeleteDevice(
p_ext->cl_ext.p_self_do
);<BR>- }<BR>-<BR> cl_mutex_destroy(
&p_port_mgr->pdo_mutex );<BR> cl_obj_deinit( p_obj
);<BR> cl_free( p_port_mgr );<BR>@@ -585,7 +584,7
@@<BR> NTSTATUS status;<BR> cl_list_item_t *p_list_item;<BR> bus_port_ext_t *p_port_ext;<BR>- bus_pdo_ext_t *p_pdo_ext
= NULL;<BR>+ bus_pdo_ext_t *p_shadow_pdo_ext, *p_pdo_ext =
NULL;<BR> size_t n_devs =
0;<BR> port_mgr_t *p_port_mgr =
p_bfi->p_port_mgr;<BR> cl_qlist_t *p_pdo_list =
&p_port_mgr->port_list;<BR>@@ -611,14 +610,14
@@<BR> p_pdo_ext = PARENT_STRUCT( p_list_item, bus_pdo_ext_t,
list_item );<BR> p_port_ext =
(bus_port_ext_t*)p_pdo_ext;<BR> <BR>- if(
p_pdo_ext->b_present && p_pdo_ext->b_hibernating
&&<BR>+ if( p_pdo_ext->b_present &&
p_pdo_ext->b_hibernating && p_pdo_ext->hca_acquired
&&<BR> (p_port_ext->port_guid.guid ==
p_pnp_rec->p_port_attr->port_guid)
)<BR> {<BR> n_devs++;<BR> break;<BR> }<BR> <BR>- BUS_TRACE(
BUS_DBG_PNP, ("%s Skipped PDO for %s: PDO %p, ext %p,
"<BR>+ BUS_TRACE( BUS_DBG_PNP, ("%s Skipped acquire hca on PDO for
%s: PDO %p, ext %p, "<BR> "present %d, missing %d,
hibernating %d, port_guid
%I64x.\n",<BR> p_bfi->whoami,<BR> p_pdo_ext->cl_ext.vfptr_pnp_po->identity,<BR>@@
-654,6 +653,31
@@<BR> p_pdo_ext->cl_ext.p_self_do,
<BR> p_pdo_ext, p_pdo_ext->b_present,
p_pdo_ext->b_reported_missing,
<BR> p_pdo_ext->b_hibernating,
p_port_ext->port_guid.guid ) );<BR>+<BR>+ for( p_list_item
= cl_qlist_head( p_pdo_list );<BR>+ p_list_item !=
cl_qlist_end( p_pdo_list );<BR>+ p_list_item =
cl_qlist_next( p_list_item )
)<BR>+ {<BR>+ p_shadow_pdo_ext =
PARENT_STRUCT( p_list_item, bus_pdo_ext_t, list_item
);<BR>+ p_port_ext =
(bus_port_ext_t*)p_shadow_pdo_ext;<BR>+<BR>+ if(
p_shadow_pdo_ext->b_present && p_shadow_pdo_ext->b_hibernating
&&<BR>+ (p_port_ext->port_guid.guid ==
p_pnp_rec->p_port_attr->port_guid)
)<BR>+ {<BR>+ p_shadow_pdo_ext->b_hibernating
= FALSE;<BR>+ p_shadow_pdo_ext->h_ca =
p_pdo_ext->h_ca;<BR>+<BR>+<BR>+ BUS_TRACE(
BUS_DBG_PNP, ("%s set shadow h_ca PDO for %s: PDO %p, ext %p,
"<BR>+
"present %d, missing %d, hibernating %d, port_guid
%I64x.\n",<BR>+
p_bfi->whoami,<BR>+
p_shadow_pdo_ext->cl_ext.vfptr_pnp_po->identity,<BR>+
p_shadow_pdo_ext->cl_ext.p_self_do,
<BR>+
p_shadow_pdo_ext, p_shadow_pdo_ext->b_present,
p_shadow_pdo_ext->b_reported_missing,
<BR>+
p_shadow_pdo_ext->b_hibernating, p_port_ext->port_guid.guid )
);<BR>+ }<BR>+ }<BR>+<BR> }<BR> }<BR> else
<BR>@@ -1144,6 +1168,10
@@<BR> port_mgr_t *p_port_mgr;<BR> bus_filter_t *p_bfi;<BR> port_pnp_ctx_t *p_ctx
=
p_pnp_rec->pnp_rec.context;<BR>+ cl_list_item_t *p_list_item;<BR>+ bus_port_ext_t *p_port_ext;<BR>+ bus_pdo_ext_t *p_pdo_ext;<BR>+ cl_qlist_t*
p_pdo_list;<BR> <BR> BUS_ENTER( BUS_DBG_PNP
);<BR> <BR>@@ -1210,6 +1238,23
@@<BR> }<BR> <BR> p_ext->b_present =
FALSE;<BR>+<BR>+ p_pdo_list =
&p_port_mgr->port_list;<BR>+<BR>+ for( p_list_item =
cl_qlist_head( p_pdo_list );<BR>+ p_list_item != cl_qlist_end(
p_pdo_list );<BR>+ p_list_item = cl_qlist_next( p_list_item )
)<BR>+ {<BR>+ p_pdo_ext = PARENT_STRUCT( p_list_item,
bus_pdo_ext_t, list_item );<BR>+ p_port_ext =
(bus_port_ext_t*) p_pdo_ext;<BR>+<BR>+ if(
(p_port_ext->port_guid.guid == ((bus_port_ext_t*)p_ext)->port_guid.guid)
)<BR>+ {<BR>+ p_pdo_ext->b_present =
FALSE;<BR>+ } <BR>+ }<BR>+<BR>+<BR> BUS_TRACE(
BUS_DBG_PNP,<BR> ("Mark removing %s: PDO %p, ext %p, present
%d, missing %d
.\n",<BR> p_ext->cl_ext.vfptr_pnp_po->identity,
p_ext->cl_ext.p_self_do, p_ext,<BR>@@ -1235,6 +1280,21 @@<BR> //
after arriving IB_PNP_PORT_ADD event from IBAL<BR> p_ext->h_ca =
NULL;<BR> <BR>+ p_pdo_list =
&p_port_mgr->port_list;<BR>+<BR>+ for( p_list_item =
cl_qlist_head( p_pdo_list );<BR>+ p_list_item != cl_qlist_end(
p_pdo_list );<BR>+ p_list_item = cl_qlist_next( p_list_item )
)<BR>+ {<BR>+ p_pdo_ext = PARENT_STRUCT( p_list_item,
bus_pdo_ext_t, list_item );<BR>+ p_port_ext =
(bus_port_ext_t*) p_pdo_ext;<BR>+<BR>+ if(
p_port_ext->port_guid.guid == ((bus_port_ext_t*)p_ext)->port_guid.guid
)<BR>+ {<BR>+ p_pdo_ext->h_ca =
NULL;<BR>+ } <BR>+ }<BR>+<BR> cl_mutex_release(
&p_port_mgr->pdo_mutex );<BR> <BR> BUS_EXIT(
BUS_DBG_PNP );<BR></FONT></DIV></BLOCKQUOTE></BODY></HTML>