mirror of https://github.com/acidanthera/audk.git
For network dynamic media detect support: invoke Snp->GetStatus() before use Snp->Mode->MediaPresent. Upon successful return of Snp->GetStatus(), the Snp->Mode->MediaPresent will be updated to indicate the latest media status.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9918 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
c5c3e7e25c
commit
e51e619ed7
|
@ -1576,6 +1576,7 @@ BdsLibNetworkBootWithMediaPresent (
|
||||||
EFI_HANDLE Handle;
|
EFI_HANDLE Handle;
|
||||||
EFI_SIMPLE_NETWORK_PROTOCOL *Snp;
|
EFI_SIMPLE_NETWORK_PROTOCOL *Snp;
|
||||||
BOOLEAN MediaPresent;
|
BOOLEAN MediaPresent;
|
||||||
|
UINT32 InterruptStatus;
|
||||||
|
|
||||||
MediaPresent = FALSE;
|
MediaPresent = FALSE;
|
||||||
|
|
||||||
|
@ -1618,6 +1619,11 @@ BdsLibNetworkBootWithMediaPresent (
|
||||||
if (!EFI_ERROR (Status)) {
|
if (!EFI_ERROR (Status)) {
|
||||||
if (Snp->Mode->MediaPresentSupported) {
|
if (Snp->Mode->MediaPresentSupported) {
|
||||||
if (Snp->Mode->State == EfiSimpleNetworkInitialized) {
|
if (Snp->Mode->State == EfiSimpleNetworkInitialized) {
|
||||||
|
//
|
||||||
|
// Invoke Snp->GetStatus() to refresh the media status
|
||||||
|
//
|
||||||
|
Snp->GetStatus (Snp, &InterruptStatus, NULL);
|
||||||
|
|
||||||
//
|
//
|
||||||
// In case some one else is using the SNP check to see if it's connected
|
// In case some one else is using the SNP check to see if it's connected
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue