summaryrefslogtreecommitdiff
path: root/MdeModulePkg
diff options
context:
space:
mode:
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2009-11-25 01:36:54 +0000
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2009-11-25 01:36:54 +0000
commit8f8bfa5b85ada0c6c6aca12a5b664c24a860eb2a (patch)
tree812fe708a394ee50980cd23666d7ceae85fe9b54 /MdeModulePkg
parent441ff98cba491589c3583ca6937137dbc8de7098 (diff)
downloadedk2-platforms-8f8bfa5b85ada0c6c6aca12a5b664c24a860eb2a.tar.xz
Fixed the bug that not to stop PXE functionality when PXE meeting some failure. And enhanced DriverBindingStop() to stop PXE functionality if PXE was still alive.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9478 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDriver.c8
-rw-r--r--MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c2
2 files changed, 10 insertions, 0 deletions
diff --git a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDriver.c b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDriver.c
index eaa3c03b6e..9dc32f2ce7 100644
--- a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDriver.c
+++ b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDriver.c
@@ -534,6 +534,14 @@ PxeBcDriverBindingStop (
if (EFI_ERROR (Status)) {
return Status;
}
+
+ //
+ // Stop functionality of PXE Base Code protocol
+ //
+ Status = PxeBc->Stop (PxeBc);
+ if (Status != EFI_SUCCESS && Status != EFI_NOT_STARTED) {
+ return Status;
+ }
Private = PXEBC_PRIVATE_DATA_FROM_PXEBC (PxeBc);
diff --git a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c
index d548e6726a..b41dc76415 100644
--- a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c
+++ b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c
@@ -2697,12 +2697,14 @@ EfiPxeLoadFile (
// Check download status
//
if (Status == EFI_SUCCESS) {
+ PxeBc->Stop (PxeBc);
return EFI_SUCCESS;
} else if (Status == EFI_BUFFER_TOO_SMALL) {
if (Buffer != NULL) {
AsciiPrint ("PXE-E05: Download buffer is smaller than requested file.\n");
} else {
+ PxeBc->Stop (PxeBc);
return Status;
}