1. Fix a bug in PXE driver that the PXE boot do not restart if a new boot option on the different IP stack is selected.

2. Retrieve the IP information after iSCSI TCPv6 connection established and fill it into iBFT table.
3. Generate a random IAID for each NIC port to require different IPv6 address in PXE driver.
4. Update function EfiMtftp6Configure() and Mtftp6RrqHandleOack() to allocate at most one UdpIo.
5. Fix a typo from “destory” to “destroy” in network code.

Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Ouyang Qian <qian.ouyang@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13859 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
sfu5
2012-10-17 08:23:41 +00:00
parent e98e59c237
commit 75dce34062
50 changed files with 320 additions and 197 deletions

View File

@ -1,7 +1,7 @@
/** @file
Implementation of Mtftp drivers.
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
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
@ -159,7 +159,7 @@ Mtftp4CreateService (
MtftpSb->Signature = MTFTP4_SERVICE_SIGNATURE;
MtftpSb->ServiceBinding = gMtftp4ServiceBindingTemplete;
MtftpSb->InDestory = FALSE;
MtftpSb->InDestroy = FALSE;
MtftpSb->ChildrenNum = 0;
InitializeListHead (&MtftpSb->Children);
@ -374,7 +374,7 @@ Mtftp4DriverBindingStop (
MtftpSb = MTFTP4_SERVICE_FROM_THIS (ServiceBinding);
if (MtftpSb->InDestory) {
if (MtftpSb->InDestroy) {
return EFI_SUCCESS;
}
@ -382,7 +382,7 @@ Mtftp4DriverBindingStop (
if (NumberOfChildren == 0) {
MtftpSb->InDestory = TRUE;
MtftpSb->InDestroy = TRUE;
gBS->UninstallProtocolInterface (
NicHandle,
@ -429,7 +429,7 @@ Mtftp4InitProtocol (
InitializeListHead (&Instance->Link);
CopyMem (&Instance->Mtftp4, &gMtftp4ProtocolTemplate, sizeof (Instance->Mtftp4));
Instance->State = MTFTP4_STATE_UNCONFIGED;
Instance->InDestory = FALSE;
Instance->InDestroy = FALSE;
Instance->Service = MtftpSb;
InitializeListHead (&Instance->Blocks);
@ -548,14 +548,14 @@ ON_ERROR:
/**
Destory one of the service binding's child.
Destroy one of the service binding's child.
@param This The service binding instance
@param ChildHandle The child handle to destory
@param ChildHandle The child handle to destroy
@retval EFI_INVALID_PARAMETER The parameter is invaid.
@retval EFI_UNSUPPORTED The child may have already been destoried.
@retval EFI_SUCCESS The child is destoried and removed from the
@retval EFI_UNSUPPORTED The child may have already been destroyed.
@retval EFI_SUCCESS The child is destroyed and removed from the
parent's child list.
**/
@ -599,11 +599,11 @@ Mtftp4ServiceBindingDestroyChild (
return EFI_INVALID_PARAMETER;
}
if (Instance->InDestory) {
if (Instance->InDestroy) {
return EFI_SUCCESS;
}
Instance->InDestory = TRUE;
Instance->InDestroy = TRUE;
//
// Close the Udp4 protocol.
@ -625,7 +625,7 @@ Mtftp4ServiceBindingDestroyChild (
);
if (EFI_ERROR (Status)) {
Instance->InDestory = FALSE;
Instance->InDestroy = FALSE;
return Status;
}

View File

@ -1,7 +1,7 @@
/** @file
Mtftp drivers function header.
Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
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
@ -113,14 +113,14 @@ Mtftp4ServiceBindingCreateChild (
);
/**
Destory one of the service binding's child.
Destroy one of the service binding's child.
@param This The service binding instance
@param ChildHandle The child handle to destory
@param ChildHandle The child handle to destroy
@retval EFI_INVALID_PARAMETER The parameter is invaid.
@retval EFI_UNSUPPORTED The child may have already been destoried.
@retval EFI_SUCCESS The child is destoried and removed from the
@retval EFI_UNSUPPORTED The child may have already been destroyed.
@retval EFI_SUCCESS The child is destroyed and removed from the
parent's child list.
**/

View File

@ -1,7 +1,7 @@
/** @file
Interface routine for Mtftp4.
Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
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
@ -1073,7 +1073,7 @@ EfiMtftp4Poll (
if (Instance->State == MTFTP4_STATE_UNCONFIGED) {
return EFI_NOT_STARTED;
} else if (Instance->State == MTFTP4_STATE_DESTORY) {
} else if (Instance->State == MTFTP4_STATE_DESTROY) {
return EFI_DEVICE_ERROR;
}

View File

@ -9,7 +9,7 @@
RFC2348 - TFTP Blocksize Option
RFC2349 - TFTP Timeout Interval and Transfer Size Options
Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
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
@ -59,7 +59,7 @@ typedef struct _MTFTP4_PROTOCOL MTFTP4_PROTOCOL;
#define MTFTP4_STATE_UNCONFIGED 0
#define MTFTP4_STATE_CONFIGED 1
#define MTFTP4_STATE_DESTORY 2
#define MTFTP4_STATE_DESTROY 2
///
/// Mtftp service block
@ -68,7 +68,7 @@ struct _MTFTP4_SERVICE {
UINT32 Signature;
EFI_SERVICE_BINDING_PROTOCOL ServiceBinding;
BOOLEAN InDestory;
BOOLEAN InDestroy;
UINT16 ChildrenNum;
LIST_ENTRY Children;
@ -99,7 +99,7 @@ struct _MTFTP4_PROTOCOL {
EFI_MTFTP4_PROTOCOL Mtftp4;
INTN State;
BOOLEAN InDestory;
BOOLEAN InDestroy;
MTFTP4_SERVICE *Service;
EFI_HANDLE Handle;