Index: drivers/storage/floppy/readwrite.c =================================================================== --- drivers/storage/floppy/readwrite.c (revision 30246) +++ drivers/storage/floppy/readwrite.c (working copy) @@ -52,7 +52,6 @@ * TODO: Figure out specify timings */ -#define NDEBUG #include #include @@ -365,8 +364,8 @@ DPRINT("floppy: RWComputeCHS: Called with offset 0x%x\n", DiskByteOffset); - /* First calculate the 1-based "absolute sector" based on the byte offset */ - ASSERT(!(DiskByteOffset % DriveInfo->DiskGeometry.BytesPerSector)); /* FIXME: Only handle full sector transfers atm */ + if(DiskByteOffset % DriveInfo->DiskGeometry.BytesPerSector) /* FIXME: Only handle full sector transfers atm */ + DPRINT("FIXME: Partial sector requests are not supported\n"); /* AbsoluteSector is zero-based to make the math a little easier */ AbsoluteSector = DiskByteOffset / DriveInfo->DiskGeometry.BytesPerSector; /* Num full sectors */ @@ -759,7 +758,7 @@ DPRINT("floppy: ReadWritePassive(): success; Completing with STATUS_SUCCESS\n"); Irp->IoStatus.Status = STATUS_SUCCESS; Irp->IoStatus.Information = Length; - IoCompleteRequest(Irp, IO_NO_INCREMENT); + IoCompleteRequest(Irp, IO_DISK_INCREMENT); StopMotor(DriveInfo->ControllerInfo); } Index: drivers/storage/floppy/floppy.c =================================================================== --- drivers/storage/floppy/floppy.c (revision 30246) +++ drivers/storage/floppy/floppy.c (working copy) @@ -40,7 +40,6 @@ * TODO: Media detection based on sector 1 */ -#define NDEBUG #include #include @@ -985,6 +984,9 @@ /* 3i: Now that we're done, set the Initialized flag so we know to free this in Unload */ gControllerInfo[i].DriveInfo[j].Initialized = TRUE; + + /* 3j: We're done */ + gControllerInfo[i].DriveInfo[j].DeviceObject->Flags &= ~DO_DEVICE_INITIALIZING; } } Index: drivers/storage/floppy/ioctl.c =================================================================== --- drivers/storage/floppy/ioctl.c (revision 30246) +++ drivers/storage/floppy/ioctl.c (working copy) @@ -31,7 +31,6 @@ * TODO: Implement format */ -#define NDEBUG #include #include @@ -244,6 +243,7 @@ /* This still works right even if DriveInfo->DiskGeometry->MediaType = Unknown */ memcpy(OutputBuffer, &DriveInfo->DiskGeometry, sizeof(DISK_GEOMETRY)); + Irp->IoStatus.Status = STATUS_SUCCESS; Irp->IoStatus.Information = sizeof(DISK_GEOMETRY); break; } Index: drivers/storage/floppy/csqrtns.c =================================================================== --- drivers/storage/floppy/csqrtns.c (revision 30246) +++ drivers/storage/floppy/csqrtns.c (working copy) @@ -38,7 +38,6 @@ * that my lock choice is a spin lock. */ -#define NDEBUG #include #include @@ -176,5 +175,6 @@ DPRINT("CSQ: Inserting IRP 0x%p\n", Irp); InsertTailList(&IrpQueue, &Irp->Tail.Overlay.ListEntry); KeReleaseSemaphore(&QueueSemaphore, 0, 1, FALSE); + IoMarkIrpPending(Irp); } Index: drivers/storage/floppy/hardware.c =================================================================== --- drivers/storage/floppy/hardware.c (revision 30246) +++ drivers/storage/floppy/hardware.c (working copy) @@ -48,7 +48,6 @@ * TODO: Figure out the right delays in Send_Byte and Get_Byte */ -#define NDEBUG #include #include