[IBAL] A fix to the pnp mechanism, don't remove the bus on query remove.
authortzachid <tzachid@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Tue, 28 Oct 2008 09:59:43 +0000 (09:59 +0000)
committertzachid <tzachid@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Tue, 28 Oct 2008 09:59:43 +0000 (09:59 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@1702 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

core/bus/kernel/bus_pnp.c

index 661d5d3..c5cb437 100644 (file)
@@ -428,13 +428,6 @@ fdo_query_remove(
 \r
        //TODO: Fail outstanding I/O operations.\r
 \r
-       if ( p_ext->p_port_mgr && p_bfi->p_port_mgr )\r
-               cl_obj_destroy( &p_ext->p_port_mgr->obj );\r
-\r
-       if ( p_ext->p_iou_mgr && p_bfi->p_iou_mgr )\r
-               cl_obj_destroy( &p_ext->p_iou_mgr->obj );\r
-\r
-\r
        *p_action = IrpSkip;\r
        /* The FDO driver must set the status even when passing down. */\r
        p_irp->IoStatus.Status = STATUS_SUCCESS;\r
@@ -468,11 +461,15 @@ fdo_release_resources(
 \r
        //TODO: Fail outstanding I/O operations.\r
 \r
-       if ( p_ext->p_port_mgr && p_bfi->p_port_mgr )\r
+       if ( p_ext->p_port_mgr && p_bfi->p_port_mgr ) {\r
                cl_obj_destroy( &p_ext->p_port_mgr->obj );\r
+               p_ext->p_port_mgr = NULL;\r
+       }\r
 \r
-       if ( p_ext->p_iou_mgr && p_bfi->p_iou_mgr )\r
+       if ( p_ext->p_iou_mgr && p_bfi->p_iou_mgr ) {\r
                cl_obj_destroy( &p_ext->p_iou_mgr->obj );\r
+               p_ext->p_iou_mgr = NULL;\r
+       }\r
 \r
        BUS_PRINT( BUS_DBG_PNP, ("Releasing BusFilter %s\n", p_bfi->whoami ));\r
        if (p_bfi) {\r