mirror of
https://github.com/reactos/reactos.git
synced 2025-04-27 17:10:22 +00:00
Used a different constant for number of poll retries
svn path=/trunk/; revision=81
This commit is contained in:
parent
a3fbbaa42d
commit
8134515a1a
2 changed files with 3 additions and 5 deletions
|
@ -1074,7 +1074,7 @@ IDEPolledRead(IN WORD Address,
|
||||||
{
|
{
|
||||||
|
|
||||||
// wait for DRQ or error
|
// wait for DRQ or error
|
||||||
for (RetryCount = 0; RetryCount < IDE_MAX_DRQ_RETRIES; RetryCount++)
|
for (RetryCount = 0; RetryCount < IDE_MAX_POLL_RETRIES; RetryCount++)
|
||||||
{
|
{
|
||||||
Status = IDEReadStatus(Address);
|
Status = IDEReadStatus(Address);
|
||||||
if (!(Status & IDE_SR_BUSY))
|
if (!(Status & IDE_SR_BUSY))
|
||||||
|
@ -1091,7 +1091,7 @@ IDEPolledRead(IN WORD Address,
|
||||||
}
|
}
|
||||||
KeStallExecutionProcessor(10);
|
KeStallExecutionProcessor(10);
|
||||||
}
|
}
|
||||||
if (RetryCount >= IDE_MAX_DRQ_RETRIES)
|
if (RetryCount >= IDE_MAX_POLL_RETRIES)
|
||||||
{
|
{
|
||||||
return IDE_ER_ABRT;
|
return IDE_ER_ABRT;
|
||||||
}
|
}
|
||||||
|
@ -1453,7 +1453,6 @@ IDEStartController(IN OUT PVOID Context)
|
||||||
}
|
}
|
||||||
KeStallExecutionProcessor(10);
|
KeStallExecutionProcessor(10);
|
||||||
}
|
}
|
||||||
Retries = IDE_MAX_BUSY_RETRIES;
|
|
||||||
if (Retries >= IDE_MAX_BUSY_RETRIES)
|
if (Retries >= IDE_MAX_BUSY_RETRIES)
|
||||||
{
|
{
|
||||||
if (++ControllerExtension->Retries > IDE_MAX_CMD_RETRIES)
|
if (++ControllerExtension->Retries > IDE_MAX_CMD_RETRIES)
|
||||||
|
@ -1916,8 +1915,6 @@ IDEIoTimer(PDEVICE_OBJECT DeviceObject,
|
||||||
{
|
{
|
||||||
PIDE_CONTROLLER_EXTENSION ControllerExtension;
|
PIDE_CONTROLLER_EXTENSION ControllerExtension;
|
||||||
|
|
||||||
DPRINT("entered timer\n");
|
|
||||||
|
|
||||||
// Setup Extension pointer
|
// Setup Extension pointer
|
||||||
ControllerExtension = (PIDE_CONTROLLER_EXTENSION) Context;
|
ControllerExtension = (PIDE_CONTROLLER_EXTENSION) Context;
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@ extern "C" {
|
||||||
#define IDE_SECTOR_BUF_SZ 512
|
#define IDE_SECTOR_BUF_SZ 512
|
||||||
#define IDE_MAX_SECTORS_PER_XFER 256
|
#define IDE_MAX_SECTORS_PER_XFER 256
|
||||||
#define IDE_MAX_RESET_RETRIES 10000
|
#define IDE_MAX_RESET_RETRIES 10000
|
||||||
|
#define IDE_MAX_POLL_RETRIES 100000
|
||||||
#define IDE_MAX_WRITE_RETRIES 1000
|
#define IDE_MAX_WRITE_RETRIES 1000
|
||||||
#define IDE_MAX_BUSY_RETRIES 100
|
#define IDE_MAX_BUSY_RETRIES 100
|
||||||
#define IDE_MAX_DRQ_RETRIES 1000
|
#define IDE_MAX_DRQ_RETRIES 1000
|
||||||
|
|
Loading…
Reference in a new issue