Commit in reactos/drivers/storage/floppy on MAIN
floppy.c+6-41.5 -> 1.6
fixed two race conditions with motor power-off; now handles disk change detection and no-disk-in-drive correctly

reactos/drivers/storage/floppy
floppy.c 1.5 -> 1.6
diff -u -r1.5 -r1.6
--- floppy.c	13 Mar 2004 05:06:49 -0000	1.5
+++ floppy.c	13 Mar 2004 07:04:54 -0000	1.6
@@ -115,14 +115,16 @@
 
   KdPrint(("floppy: StartMotor called\n"));
 
-  if(DriveInfo->ControllerInfo->StopDpcQueued && 
-     !KeCancelTimer(&DriveInfo->ControllerInfo->MotorTimer))
+  if(DriveInfo->ControllerInfo->StopDpcQueued && !KeCancelTimer(&DriveInfo->ControllerInfo->MotorTimer))
     {
       /* Motor turner-offer is already running; wait for it to finish */
+      KdPrint(("floppy: StartMotor: motor turner-offer is already running; waiting for it\n"));
       KeWaitForSingleObject(&DriveInfo->ControllerInfo->MotorStoppedEvent, Executive, KernelMode, FALSE, NULL);
-      DriveInfo->ControllerInfo->StopDpcQueued = FALSE;
+      KdPrint(("floppy: StartMotor: wait satisfied\n"));
     }
 
+  DriveInfo->ControllerInfo->StopDpcQueued = FALSE;
+
   if(HwTurnOnMotor(DriveInfo) != STATUS_SUCCESS)
     KdPrint(("floppy: StartMotor(): warning: HwTurnOnMotor failed\n"));
 }
@@ -768,7 +770,7 @@
   /* Init the stop stuff */
   KeInitializeDpc(&ControllerInfo->MotorStopDpc, MotorStopDpcFunc, ControllerInfo);
   KeInitializeTimer(&ControllerInfo->MotorTimer);
-  KeInitializeEvent(&ControllerInfo->MotorStoppedEvent, SynchronizationEvent, FALSE);
+  KeInitializeEvent(&ControllerInfo->MotorStoppedEvent, NotificationEvent, FALSE);
   ControllerInfo->StopDpcQueued = FALSE;
 
   /* 
CVSspam 0.2.8