fixed a couple motor start/stop bugs; fixed a seek offset

svn path=/trunk/; revision=8678
This commit is contained in:
Vizzini 2004-03-13 05:06:49 +00:00
parent 410da0d376
commit 2207df1ae4
2 changed files with 4 additions and 4 deletions

View file

@ -326,7 +326,7 @@ NTSTATUS NTAPI ResetChangeFlag(PDRIVE_INFO DriveInfo)
} }
/* Seek back to 0 */ /* 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")); KdPrint(("floppy: ResetChangeFlag(): HwSeek failed; returning STATUS_IO_DEVICE_ERROR\n"));
StopMotor(DriveInfo->ControllerInfo); StopMotor(DriveInfo->ControllerInfo);

View file

@ -458,10 +458,12 @@ VOID NTAPI ReadWritePassive(PDRIVE_INFO DriveInfo,
/* /*
* Check the change line, and if it's set, return * Check the change line, and if it's set, return
*/ */
StartMotor(DriveInfo);
if(HwDiskChanged(DeviceObject->DeviceExtension, &DiskChanged) != STATUS_SUCCESS) if(HwDiskChanged(DeviceObject->DeviceExtension, &DiskChanged) != STATUS_SUCCESS)
{ {
KdPrint(("floppy: ReadWritePassive(): unable to detect disk change; Completing with STATUS_UNSUCCESSFUL\n")); KdPrint(("floppy: ReadWritePassive(): unable to detect disk change; Completing with STATUS_UNSUCCESSFUL\n"));
IoCompleteRequest(Irp, IO_NO_INCREMENT); IoCompleteRequest(Irp, IO_NO_INCREMENT);
StopMotor(DriveInfo->ControllerInfo);
return; return;
} }
@ -479,12 +481,10 @@ VOID NTAPI ReadWritePassive(PDRIVE_INFO DriveInfo,
Irp->IoStatus.Status = STATUS_NO_MEDIA_IN_DEVICE; Irp->IoStatus.Status = STATUS_NO_MEDIA_IN_DEVICE;
IoCompleteRequest(Irp, IO_NO_INCREMENT); IoCompleteRequest(Irp, IO_NO_INCREMENT);
StopMotor(DriveInfo->ControllerInfo);
return; return;
} }
/* Start the motor and set the initial data rate */
StartMotor(DriveInfo);
/* /*
* Figure out the media type, if we don't know it already * Figure out the media type, if we don't know it already
*/ */