mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
Set a better value for gap3 on read/write requests.
svn path=/trunk/; revision=14578
This commit is contained in:
parent
a6e0f1b9c1
commit
85197737c3
1 changed files with 11 additions and 1 deletions
|
@ -430,6 +430,7 @@ VOID NTAPI ReadWritePassive(PDRIVE_INFO DriveInfo,
|
|||
NTSTATUS Status;
|
||||
BOOLEAN DiskChanged;
|
||||
ULONG_PTR TransferByteOffset;
|
||||
UCHAR Gap;
|
||||
|
||||
PAGED_CODE();
|
||||
|
||||
|
@ -522,6 +523,15 @@ VOID NTAPI ReadWritePassive(PDRIVE_INFO DriveInfo,
|
|||
WriteToDevice = TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
* FIXME:
|
||||
* FloppyDeviceData.ReadWriteGapLength specify the value for the physical drive.
|
||||
* We should set this value depend on the format of the inserted disk and possible
|
||||
* depend on the request (read or write). A value of 0 results in one rotation
|
||||
* between the sectors (7.2sec for reading a track).
|
||||
*/
|
||||
Gap = DriveInfo->FloppyDeviceData.ReadWriteGapLength;
|
||||
|
||||
/*
|
||||
* Set up DMA transfer
|
||||
*
|
||||
|
@ -703,7 +713,7 @@ VOID NTAPI ReadWritePassive(PDRIVE_INFO DriveInfo,
|
|||
|
||||
/* Issue the read/write command to the controller. Note that it expects the opposite of WriteToDevice. */
|
||||
if(HwReadWriteData(DriveInfo->ControllerInfo, !WriteToDevice, DriveInfo->UnitNumber, Cylinder, Head, StartSector,
|
||||
DriveInfo->BytesPerSectorCode, DriveInfo->DiskGeometry.SectorsPerTrack, 0, 0xff) != STATUS_SUCCESS)
|
||||
DriveInfo->BytesPerSectorCode, DriveInfo->DiskGeometry.SectorsPerTrack, Gap, 0xff) != STATUS_SUCCESS)
|
||||
{
|
||||
KdPrint(("floppy: ReadWritePassive(): HwReadWriteData returned failure; unable to read; completing with STATUS_UNSUCCESSFUL\n"));
|
||||
RWFreeAdapterChannel(DriveInfo->ControllerInfo->AdapterObject);
|
||||
|
|
Loading…
Reference in a new issue