summaryrefslogtreecommitdiff
path: root/OptionRomPkg/UndiRuntimeDxe
diff options
context:
space:
mode:
authorxdu2 <xdu2@6f19259b-4bc3-4df7-8a09-765794883524>2010-02-12 08:45:38 +0000
committerxdu2 <xdu2@6f19259b-4bc3-4df7-8a09-765794883524>2010-02-12 08:45:38 +0000
commit135ec2db42941107fc2ec69107784828a1f81e91 (patch)
treeff947be7d8deee96e787439e613207cc1b5cdccb /OptionRomPkg/UndiRuntimeDxe
parentc777c3574ee91f8f75104eb090cd24ce0b4cf511 (diff)
downloadedk2-platforms-135ec2db42941107fc2ec69107784828a1f81e91.tar.xz
Update UNDI driver to expose dynamic media detect capability.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9995 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'OptionRomPkg/UndiRuntimeDxe')
-rw-r--r--OptionRomPkg/UndiRuntimeDxe/Decode.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/OptionRomPkg/UndiRuntimeDxe/Decode.c b/OptionRomPkg/UndiRuntimeDxe/Decode.c
index d2d4aba888..65ff692f7f 100644
--- a/OptionRomPkg/UndiRuntimeDxe/Decode.c
+++ b/OptionRomPkg/UndiRuntimeDxe/Decode.c
@@ -1,7 +1,7 @@
/** @file
Provides the basic UNID functions.
-Copyright (c) 2006 - 2009, Intel Corporation
+Copyright (c) 2006 - 2010, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -264,7 +264,8 @@ UNDI_GetInitInfo (
DbPtr->SupportedLoopBackModes = PXE_LOOPBACK_INTERNAL_SUPPORTED |
PXE_LOOPBACK_EXTERNAL_SUPPORTED;
- CdbPtr->StatFlags |= PXE_STATFLAGS_CABLE_DETECT_SUPPORTED;
+ CdbPtr->StatFlags |= (PXE_STATFLAGS_CABLE_DETECT_SUPPORTED |
+ PXE_STATFLAGS_GET_STATUS_NO_MEDIA_SUPPORTED);
return ;
}
@@ -1086,6 +1087,18 @@ UNDI_Status (
}
}
+ //
+ // Return current media status
+ //
+ if ((CdbPtr->OpFlags & PXE_OPFLAGS_GET_MEDIA_STATUS) != 0) {
+ AdapterInfo->PhyAddress = 0xFF;
+ AdapterInfo->CableDetect = 1;
+
+ if (!PhyDetect (AdapterInfo)) {
+ CdbPtr->StatFlags |= PXE_STATFLAGS_GET_STATUS_NO_MEDIA;
+ }
+ }
+
return ;
}