diff --git a/reactos/drivers/storage/floppy/csqrtns.c b/reactos/drivers/storage/floppy/csqrtns.c index b059db3b4c0..164eb5a5eea 100644 --- a/reactos/drivers/storage/floppy/csqrtns.c +++ b/reactos/drivers/storage/floppy/csqrtns.c @@ -175,5 +175,6 @@ VOID NTAPI CsqInsertIrp(PIO_CSQ UnusedCsq, TRACE_(FLOPPY, "CSQ: Inserting IRP 0x%p\n", Irp); InsertTailList(&IrpQueue, &Irp->Tail.Overlay.ListEntry); KeReleaseSemaphore(&QueueSemaphore, 0, 1, FALSE); + IoMarkIrpPending(Irp); } diff --git a/reactos/drivers/storage/floppy/floppy.c b/reactos/drivers/storage/floppy/floppy.c index 6c3e980b99b..ff2414323d3 100644 --- a/reactos/drivers/storage/floppy/floppy.c +++ b/reactos/drivers/storage/floppy/floppy.c @@ -686,16 +686,16 @@ static NTSTATUS NTAPI InitController(PCONTROLLER_INFO ControllerInfo) return STATUS_IO_DEVICE_ERROR; } -/* Check if floppy drive exists */ + /* Check if floppy drive exists */ if(HwSenseInterruptStatus(ControllerInfo) != STATUS_SUCCESS) - { - WARN_(FLOPPY, "Floppy drive not detected! Returning STATUS_IO_DEVICE_ERROR\n"); - return STATUS_IO_DEVICE_ERROR; - } + { + WARN_(FLOPPY, "Floppy drive not detected!\n"); + return STATUS_NO_SUCH_DEVICE; + } INFO_(FLOPPY, "InitController: resetting the controller after floppy detection\n"); - /* Reset the controller */ + /* Reset the controller again after drive detection */ if(HwReset(ControllerInfo) != STATUS_SUCCESS) { WARN_(FLOPPY, "InitController: unable to reset controller\n"); @@ -984,6 +984,9 @@ static BOOLEAN NTAPI AddControllers(PDRIVER_OBJECT DriverObject) /* 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: Clear the DO_DEVICE_INITIALIZING flag */ + gControllerInfo[i].DriveInfo[j].DeviceObject->Flags &= ~DO_DEVICE_INITIALIZING; } } diff --git a/reactos/drivers/storage/floppy/readwrite.c b/reactos/drivers/storage/floppy/readwrite.c index 85dead7f9b8..84378af23ee 100644 --- a/reactos/drivers/storage/floppy/readwrite.c +++ b/reactos/drivers/storage/floppy/readwrite.c @@ -758,7 +758,7 @@ VOID NTAPI ReadWritePassive(PDRIVE_INFO DriveInfo, INFO_(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); }