Author: cfinck
Date: Sat Dec 12 20:38:03 2009
New Revision: 44555
URL: http://svn.reactos.org/svn/reactos?rev=44555&view=rev
Log:
Document what r44552 is all about.
Modified:
trunk/reactos/drivers/storage/ide/uniata/id_ata.cpp
Modified: trunk/reactos/drivers/storage/ide/uniata/id_ata.cpp
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/ide/uniata…
==============================================================================
--- trunk/reactos/drivers/storage/ide/uniata/id_ata.cpp [iso-8859-1] (original)
+++ trunk/reactos/drivers/storage/ide/uniata/id_ata.cpp [iso-8859-1] Sat Dec 12 20:38:03 2009
@@ -689,11 +689,17 @@
SelectDrive(chan, DeviceNumber);
AtapiStallExecution(10000);
AtapiWritePort1(chan, IDX_IO1_o_Command, IDE_COMMAND_ATAPI_RESET);
+
+ // ReactOS modification: Already stop looping when we know that the drive has finished resetting.
+ // Not all controllers clear the IDE_STATUS_BUSY flag (e.g. not the VMware one), so ensure that
+ // the maximum waiting time (30 * i = 0.9 seconds) does not exceed the one of the original
+ // implementation. (which is around 1 second)
while ((AtapiReadPort1(chan, IDX_IO1_i_Status) & IDE_STATUS_BUSY) &&
i--)
{
AtapiStallExecution(30);
}
+
SelectDrive(chan, DeviceNumber);
WaitOnBusy(chan);
GetBaseStatus(chan, statusByte2);
Author: cfinck
Date: Sat Dec 12 18:14:26 2009
New Revision: 44552
URL: http://svn.reactos.org/svn/reactos?rev=44552&view=rev
Log:
Set a lower maximum number of iterations in AtapiSoftReset.
This reduces the UniATA bootup time in VMware (which doesn't seem to clear the IDE_STATUS_BUSY flag) from 70 seconds to around 8.
Tested successfully under QEMU, VBox, VMware and an Athlon XP-based system.
Modified:
trunk/reactos/drivers/storage/ide/uniata/id_ata.cpp
Modified: trunk/reactos/drivers/storage/ide/uniata/id_ata.cpp
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/ide/uniata…
==============================================================================
--- trunk/reactos/drivers/storage/ide/uniata/id_ata.cpp [iso-8859-1] (original)
+++ trunk/reactos/drivers/storage/ide/uniata/id_ata.cpp [iso-8859-1] Sat Dec 12 18:14:26 2009
@@ -679,7 +679,7 @@
)
{
//ULONG c = chan->lChannel;
- ULONG i = 1000 * 1000;
+ ULONG i = 30 * 1000;
UCHAR dma_status = 0;
KdPrint2((PRINT_PREFIX "AtapiSoftReset:\n"));
UCHAR statusByte2;