Author: fireball
Date: Tue May 12 17:27:45 2009
New Revision: 40896
URL:
http://svn.reactos.org/svn/reactos?rev=40896&view=rev
Log:
- Fix WaitOnBusy, WaitOnBaseBusy and Wait[Short]ForDrq to wait and loop exactly the same
as our existing atapi driver. This greatly enhances uniata's compatibility, especially
on modern highspeed hardware where a controller usually didn't have enough time to
change its state and was considered invalid.
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] Tue May 12 17:27:45
2009
@@ -493,10 +493,10 @@
{
ULONG i;
UCHAR Status;
- for (i=0; i<200; i++) {
+ for (i=0; i<20000; i++) {
GetStatus(chan, Status);
if (Status & IDE_STATUS_BUSY) {
- AtapiStallExecution(10);
+ AtapiStallExecution(150);
continue;
} else {
break;
@@ -537,10 +537,10 @@
{
ULONG i;
UCHAR Status;
- for (i=0; i<200; i++) {
+ for (i=0; i<20000; i++) {
GetBaseStatus(chan, Status);
if (Status & IDE_STATUS_BUSY) {
- AtapiStallExecution(10);
+ AtapiStallExecution(150);
continue;
} else {
break;
@@ -640,11 +640,11 @@
for (i=0; i<1000; i++) {
GetStatus(chan, Status);
if (Status & IDE_STATUS_BUSY) {
- AtapiStallExecution(10);
+ AtapiStallExecution(100);
} else if (Status & IDE_STATUS_DRQ) {
break;
} else {
- AtapiStallExecution(10);
+ AtapiStallExecution(200);
}
}
return Status;
@@ -661,11 +661,11 @@
for (i=0; i<2; i++) {
GetStatus(chan, Status);
if (Status & IDE_STATUS_BUSY) {
- AtapiStallExecution(10);
+ AtapiStallExecution(100);
} else if (Status & IDE_STATUS_DRQ) {
break;
} else {
- AtapiStallExecution(10);
+ AtapiStallExecution(100);
}
}
return Status;