[ros-diffs] [fireball] 24798: The code expects synchronous behaviour here, so until a better solution exists, IoSynchronousInvalidateDeviceRelations() is going to be used. This fixes the "Loading ndis.sys" problems. Thanks to Dmitry Gorbachev, confirmed by Herve Poussineau. See issue #1875 for more details.

fireball at svn.reactos.org fireball at svn.reactos.org
Wed Nov 22 11:15:51 CET 2006


Author: fireball
Date: Wed Nov 22 13:15:51 2006
New Revision: 24798

URL: http://svn.reactos.org/svn/reactos?rev=24798&view=rev
Log:
The code expects synchronous behaviour here, so until a better solution exists, IoSynchronousInvalidateDeviceRelations() is going to be used.
This fixes the "Loading ndis.sys" problems.

Thanks to Dmitry Gorbachev, confirmed by Herve Poussineau.
See issue #1875 for more details.

Modified:
    trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c

Modified: trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c?rev=24798&r1=24797&r2=24798&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c (original)
+++ trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c Wed Nov 22 13:15:51 2006
@@ -43,6 +43,13 @@
     IN PDEVICE_OBJECT DeviceObject,
     IN PVOID InvalidateContext);
 
+VOID
+NTAPI
+IoSynchronousInvalidateDeviceRelations(
+    IN PDEVICE_OBJECT DeviceObject,
+    IN DEVICE_RELATION_TYPE Type);
+
+
 /* FUNCTIONS *****************************************************************/
 
 PDEVICE_NODE
@@ -144,7 +151,9 @@
 	  if (IopDeviceNodeHasFlag(DeviceNode, DNF_NEED_ENUMERATION_ONLY))
       {
          DPRINT("Device needs enumeration, invalidating bus relations\n");
-         IoInvalidateDeviceRelations(DeviceNode->PhysicalDeviceObject, BusRelations);
+         /* Invalidate device relations synchronously
+            (otherwise there will be dirty read of DeviceNode) */
+         IoSynchronousInvalidateDeviceRelations(DeviceNode->PhysicalDeviceObject, BusRelations);
          IopDeviceNodeClearFlag(DeviceNode, DNF_NEED_ENUMERATION_ONLY);
       }
    }




More information about the Ros-diffs mailing list