mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 17:34:57 +00:00
fixed a couple motor start/stop bugs; fixed a seek offset
svn path=/trunk/; revision=8678
This commit is contained in:
parent
410da0d376
commit
2207df1ae4
2 changed files with 4 additions and 4 deletions
|
@ -326,7 +326,7 @@ NTSTATUS NTAPI ResetChangeFlag(PDRIVE_INFO DriveInfo)
|
|||
}
|
||||
|
||||
/* Seek back to 0 */
|
||||
if(HwSeek(DriveInfo, 1) != STATUS_SUCCESS)
|
||||
if(HwSeek(DriveInfo, 0) != STATUS_SUCCESS)
|
||||
{
|
||||
KdPrint(("floppy: ResetChangeFlag(): HwSeek failed; returning STATUS_IO_DEVICE_ERROR\n"));
|
||||
StopMotor(DriveInfo->ControllerInfo);
|
||||
|
|
|
@ -458,10 +458,12 @@ VOID NTAPI ReadWritePassive(PDRIVE_INFO DriveInfo,
|
|||
/*
|
||||
* Check the change line, and if it's set, return
|
||||
*/
|
||||
StartMotor(DriveInfo);
|
||||
if(HwDiskChanged(DeviceObject->DeviceExtension, &DiskChanged) != STATUS_SUCCESS)
|
||||
{
|
||||
KdPrint(("floppy: ReadWritePassive(): unable to detect disk change; Completing with STATUS_UNSUCCESSFUL\n"));
|
||||
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
||||
StopMotor(DriveInfo->ControllerInfo);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -479,12 +481,10 @@ VOID NTAPI ReadWritePassive(PDRIVE_INFO DriveInfo,
|
|||
Irp->IoStatus.Status = STATUS_NO_MEDIA_IN_DEVICE;
|
||||
|
||||
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
||||
StopMotor(DriveInfo->ControllerInfo);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Start the motor and set the initial data rate */
|
||||
StartMotor(DriveInfo);
|
||||
|
||||
/*
|
||||
* Figure out the media type, if we don't know it already
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue