RtlZeroMemory(p_ext, sizeof *p_ext);\r
cl_init_pnp_po_ext( g_ControlDeviceObject, NULL, \r
NULL, bus_globals.dbg_lvl, NULL, NULL );\r
- IoInitializeRemoveLock( &p_ext->cl_ext.stop_lock, 'dtci', 0, 1000 );\r
\r
/* enable user-mode access to IB stack */\r
BUS_PRINT( BUS_DBG_PNP, ("Remove-n-reCreate dos_name symlink\n") );\r
\r
/* Store the pointer to our own device. */\r
p_ext->p_self_do = p_dev_obj;\r
+\r
IoInitializeRemoveLock( &p_ext->remove_lock, 'bilc', 15, 1000 );\r
+ IoInitializeRemoveLock( &p_ext->stop_lock, 'dtci', 0, 1000 );\r
\r
/* Initialize the PnP states. */\r
p_ext->pnp_state = NotStarted;\r
if( NT_SUCCESS( status ) )\r
cl_set_pnp_state( p_ext, Started );\r
\r
- /*\r
- * If we get the start request when we're already started, don't \r
- * re-initialize the stop lock.\r
- */\r
- if( p_ext->last_pnp_state != Started ) {\r
- CL_TRACE( CL_DBG_PNP, p_ext->dbg_lvl, ("IoInitializeRemoveLock: stop_lock %p[\n", &p_ext->stop_lock));\r
- IoInitializeRemoveLock( &p_ext->stop_lock, 'dtci', 0, 1000 );\r
- }\r
-\r
CL_EXIT( CL_DBG_PNP, p_ext->dbg_lvl );\r
return status;\r
}\r
return status;\r
}\r
\r
- if( p_ext->last_pnp_state == Started )\r
- {\r
- /*\r
- * Re-initialize the stop lock before rolling back the PnP\r
- * state so that there's no contention while it's uninitialized.\r
- */\r
- CL_TRACE( CL_DBG_PNP, p_ext->dbg_lvl, ("IoInitializeRemoveLock: stop_lock %p[\n", &p_ext->stop_lock));\r
- IoInitializeRemoveLock( &p_ext->stop_lock, 'dtci', 0, 1000 );\r
-#if 0 \r
- // leo: it seems like a bug, because it can never get released\r
- {\r
- /* \r
- * Acquire the stop lock to allow releasing and waiting when stopping.\r
- */\r
- NTSTATUS status1;\r
- CL_TRACE( CL_DBG_PNP, p_ext->dbg_lvl, ("IoAcquireRemoveLock: stop_lock %p[\n", &p_ext->stop_lock));\r
- status1 = IoAcquireRemoveLock( &p_ext->stop_lock, NULL );\r
- if( !NT_SUCCESS( status1 ) )\r
- {\r
- CL_TRACE( CL_DBG_ERROR, p_ext->dbg_lvl, \r
- ("IoAcquireRemoveLock returned %08x. Continue anyway ...\n", status) );\r
- }\r
- CL_TRACE( CL_DBG_PNP, p_ext->dbg_lvl, ("IoAcquireRemoveLock: stop_lock ]\n"));\r
- }\r
-#endif \r
- }\r
-\r
/* Return to the previous PnP state. */\r
cl_rollback_pnp_state( p_ext );\r
\r