From: Colin Finck Date: Sat, 12 Dec 2009 19:38:03 +0000 (+0000) Subject: Document what r44552 is all about. X-Git-Tag: backups/aicom-network-stable@46924~315 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=a9c37bad74f0abc6408419ee43d3a6ce783cdf43 Document what r44552 is all about. svn path=/trunk/; revision=44555 --- diff --git a/reactos/drivers/storage/ide/uniata/id_ata.cpp b/reactos/drivers/storage/ide/uniata/id_ata.cpp index e1950a428c8..70976684235 100644 --- a/reactos/drivers/storage/ide/uniata/id_ata.cpp +++ b/reactos/drivers/storage/ide/uniata/id_ata.cpp @@ -689,11 +689,17 @@ AtapiSoftReset( 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);