For network dynamic media support:

1. add library function NetLibDetectMedia to NetLib for media detection
2. update MnpDxe to periodically poll for media status update and check for media status before packet transmit
3. update Ip4Dxe to return ModeData using Mnp->GetModeData()
4. update IScsiDxe to check for media status before try to do DHCP and session login
5. update UefiPxeBcDxe to check for media status before PXE start

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9919 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
xdu2
2010-02-03 04:37:53 +00:00
parent e51e619ed7
commit dd29f3edb9
16 changed files with 449 additions and 62 deletions

View File

@ -1,7 +1,7 @@
/** @file
Implementation of Managed Network Protocol public services.
Copyright (c) 2005 - 2009, Intel Corporation.<BR>
Copyright (c) 2005 - 2010, Intel Corporation.<BR>
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
@ -52,6 +52,7 @@ MnpGetModeData (
EFI_SIMPLE_NETWORK_PROTOCOL *Snp;
EFI_TPL OldTpl;
EFI_STATUS Status;
UINT32 InterruptStatus;
if (This == NULL) {
return EFI_INVALID_PARAMETER;
@ -73,6 +74,12 @@ MnpGetModeData (
// Copy the underlayer Snp mode data.
//
Snp = Instance->MnpServiceData->MnpDeviceData->Snp;
//
// Upon successful return of GetStatus(), the Snp->Mode->MediaPresent
// will be updated to reflect any change of media status
//
Snp->GetStatus (Snp, &InterruptStatus, NULL);
CopyMem (SnpModeData, Snp->Mode, sizeof (*SnpModeData));
}