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:
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
The implementation of iSCSI protocol based on RFC3720.
|
||||
|
||||
Copyright (c) 2004 - 2009, Intel Corporation.<BR>
|
||||
Copyright (c) 2004 - 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 text of the license may be found at
|
||||
@@ -276,7 +276,9 @@ IScsiDestroyConnection (
|
||||
|
||||
@retval EFI_SUCCESS The iSCSI session login procedure finished.
|
||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
|
||||
@retval EFI_NO_MEDIA There was a media error.
|
||||
@retval Others Other errors as indicated.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
IScsiSessionLogin (
|
||||
@@ -287,9 +289,19 @@ IScsiSessionLogin (
|
||||
ISCSI_SESSION *Session;
|
||||
ISCSI_CONNECTION *Conn;
|
||||
EFI_TCP4_PROTOCOL *Tcp4;
|
||||
BOOLEAN MediaPresent;
|
||||
|
||||
Session = &Private->Session;
|
||||
|
||||
//
|
||||
// Check media status before session login
|
||||
//
|
||||
MediaPresent = TRUE;
|
||||
NetLibDetectMedia (Private->Controller, &MediaPresent);
|
||||
if (!MediaPresent) {
|
||||
return EFI_NO_MEDIA;
|
||||
}
|
||||
|
||||
//
|
||||
// Create a connection for the session.
|
||||
//
|
||||
|
Reference in New Issue
Block a user