MdeModulePkg/AtaAtapiPassThru: Handle timeout 0 as indefinitely wait to strictly comply with UEFI spec

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tian, Feng <feng.tian@intel.com>
Reviewed-by: Li, Elvin <elvin.li@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15534 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Tian, Feng
2014-05-15 07:09:14 +00:00
committed by erictian
parent 129ff94661
commit ab82122dfe
4 changed files with 151 additions and 68 deletions

View File

@@ -1339,7 +1339,12 @@ AtaPassThruPassThru (
Task->Packet = Packet;
Task->Event = Event;
Task->IsStart = FALSE;
Task->RetryTimes = 0;
Task->RetryTimes = DivU64x32(Packet->Timeout, 1000) + 1;
if (Packet->Timeout == 0) {
Task->InfiniteWait = TRUE;
} else {
Task->InfiniteWait = FALSE;
}
OldTpl = gBS->RaiseTPL (TPL_NOTIFY);
InsertTailList (&Instance->NonBlockingTaskList, &Task->Link);