<!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.6000.16587" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><SPAN class=734480115-27102008>This bug happens
when trying to disable the HCA while opensm is running.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=734480115-27102008>From the perspective
of ib_bus there is a pnp query of query_remove. </SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=734480115-27102008>The bus driver
answers that remove can happen and also calls cl_obj_destroy(
&p_ext->p_port_mgr->obj );</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=734480115-27102008></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=734480115-27102008>Since the HCA
answers query_remove with no, we get a cancel_remvove. Which we don't handle.
(that is </SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=734480115-27102008>p_port_mgr is not
being created again).</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=734480115-27102008></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=734480115-27102008>More than that,
since now there is no bus driver we also get a surprise removal from the pnp
manager.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=734480115-27102008>In this function we
have been using p_port_mgr which is now null => blue
screen.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=734480115-27102008></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=734480115-27102008>Our solution to the
problem is simple, we only destroy p_port_mgr on the function
fdo_release_resources()</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=734480115-27102008>(we do nothing on
the query remove).</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=734480115-27102008></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=734480115-27102008>Please review the
attached patch.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=734480115-27102008></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=734480115-27102008>Index:
Q:/projinf2/trunk/core/bus/kernel/bus_pnp.c<BR>===================================================================<BR>---
Q:/projinf2/trunk/core/bus/kernel/bus_pnp.c (revision 3373)<BR>+++
Q:/projinf2/trunk/core/bus/kernel/bus_pnp.c (working copy)<BR>@@ -428,13
+428,6 @@<BR> <BR> //TODO: Fail outstanding I/O
operations.<BR> <BR>- if ( p_ext->p_port_mgr &&
p_bfi->p_port_mgr )<BR>- cl_obj_destroy(
&p_ext->p_port_mgr->obj );<BR>-<BR>- if ( p_ext->p_iou_mgr
&& p_bfi->p_iou_mgr )<BR>- cl_obj_destroy(
&p_ext->p_iou_mgr->obj );<BR>-<BR>-<BR> *p_action =
IrpSkip;<BR> /* The FDO driver must set the status even when passing
down. */<BR> p_irp->IoStatus.Status = STATUS_SUCCESS;<BR>@@
-468,11 +461,15 @@<BR> <BR> //TODO: Fail outstanding I/O
operations.<BR> <BR>- if ( p_ext->p_port_mgr &&
p_bfi->p_port_mgr )<BR>+ if ( p_ext->p_port_mgr &&
p_bfi->p_port_mgr ) {<BR> cl_obj_destroy(
&p_ext->p_port_mgr->obj );<BR>+ p_ext->p_port_mgr =
NULL;<BR>+ }<BR> <BR>- if ( p_ext->p_iou_mgr &&
p_bfi->p_iou_mgr )<BR>+ if ( p_ext->p_iou_mgr &&
p_bfi->p_iou_mgr ) {<BR> cl_obj_destroy(
&p_ext->p_iou_mgr->obj );<BR>+ p_ext->p_iou_mgr =
NULL;<BR>+ }<BR> <BR> BUS_PRINT( BUS_DBG_PNP, ("Releasing
BusFilter %s\n", p_bfi->whoami ));<BR> if (p_bfi)
{<BR></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=734480115-27102008></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=734480115-27102008>Thanks</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=734480115-27102008>Tzachi</SPAN></FONT></DIV></BODY></HTML>