mirror of
https://github.com/tianocore/edk2
synced 2026-08-27 00:23:19 -04:00
Merge ead1728e09 into cc9a0425a2
This commit is contained in:
commit
ae74a3976b
1 changed files with 7 additions and 0 deletions
|
|
@ -2696,6 +2696,7 @@ NetLibDetectMediaWaitTimeout (
|
|||
EFI_STATUS TimerStatus;
|
||||
EFI_EVENT Timer;
|
||||
UINT64 TimeRemained;
|
||||
EFI_TPL OldTpl;
|
||||
|
||||
if (MediaState == NULL) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
|
|
@ -2719,6 +2720,7 @@ NetLibDetectMediaWaitTimeout (
|
|||
(VOID *)&Aip
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||
MediaPresent = TRUE;
|
||||
Status = NetLibDetectMedia (ServiceHandle, &MediaPresent);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
|
|
@ -2729,6 +2731,8 @@ NetLibDetectMediaWaitTimeout (
|
|||
}
|
||||
}
|
||||
|
||||
gBS->RestoreTPL (OldTpl);
|
||||
|
||||
//
|
||||
// NetLibDetectMedia doesn't support EFI_NOT_READY status, return now!
|
||||
//
|
||||
|
|
@ -2756,6 +2760,7 @@ NetLibDetectMediaWaitTimeout (
|
|||
//
|
||||
// If gEfiAdapterInfoMediaStateGuid is not supported, call NetLibDetectMedia to get media state!
|
||||
//
|
||||
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||
MediaPresent = TRUE;
|
||||
Status = NetLibDetectMedia (ServiceHandle, &MediaPresent);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
|
|
@ -2766,6 +2771,8 @@ NetLibDetectMediaWaitTimeout (
|
|||
}
|
||||
}
|
||||
|
||||
gBS->RestoreTPL (OldTpl);
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue