diff options
author | xdu2 <xdu2@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-02-03 04:37:29 +0000 |
---|---|---|
committer | xdu2 <xdu2@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-02-03 04:37:29 +0000 |
commit | e51e619ed77a75b0992197574a8e376f76357a7a (patch) | |
tree | 8911becfac652875e7b913edab56831ccf16c257 /IntelFrameworkModulePkg/Library/GenericBdsLib | |
parent | c5c3e7e25c80ca6992447d6e5b3dd84ff6866a53 (diff) | |
download | edk2-platforms-e51e619ed77a75b0992197574a8e376f76357a7a.tar.xz |
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
Diffstat (limited to 'IntelFrameworkModulePkg/Library/GenericBdsLib')
-rw-r--r-- | IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c b/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c index 40984adb3a..59e3a6e20f 100644 --- a/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c +++ b/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c @@ -1576,6 +1576,7 @@ BdsLibNetworkBootWithMediaPresent ( EFI_HANDLE Handle;
EFI_SIMPLE_NETWORK_PROTOCOL *Snp;
BOOLEAN MediaPresent;
+ UINT32 InterruptStatus;
MediaPresent = FALSE;
@@ -1619,6 +1620,11 @@ BdsLibNetworkBootWithMediaPresent ( if (Snp->Mode->MediaPresentSupported) {
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
//
MediaPresent = Snp->Mode->MediaPresent;
|