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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user