Sync the latest version from R8.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4400 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
vanjeff
2007-12-18 07:01:23 +00:00
parent 372787b85a
commit c4a62a12c2
26 changed files with 790 additions and 424 deletions

View File

@ -413,7 +413,7 @@ ArpDriverBindingStop (
//
NicHandle = NetLibGetNicHandle (ControllerHandle, &gEfiManagedNetworkProtocolGuid);
if (NicHandle == NULL) {
return EFI_SUCCESS;
return EFI_DEVICE_ERROR;
}
//
@ -429,51 +429,44 @@ ArpDriverBindingStop (
);
if (EFI_ERROR (Status)) {
ARP_DEBUG_ERROR (("ArpDriverBindingStop: Open ArpSb failed, %r.\n", Status));
return Status;
return EFI_DEVICE_ERROR;
}
ArpService = ARP_SERVICE_DATA_FROM_THIS (ServiceBinding);
while (!NetListIsEmpty (&ArpService->ChildrenList)) {
if (NumberOfChildren == 0) {
//
// Iterate all the instances.
// Uninstall the ARP ServiceBinding protocol.
//
Instance = NET_LIST_HEAD (&ArpService->ChildrenList, ARP_INSTANCE_DATA, List);
gBS->UninstallMultipleProtocolInterfaces (
NicHandle,
&gEfiArpServiceBindingProtocolGuid,
&ArpService->ServiceBinding,
NULL
);
//
// Destroy this arp child.
// Clean the arp servicebinding context data and free the memory allocated.
//
ServiceBinding->DestroyChild (ServiceBinding, Instance->Handle);
ArpCleanService (ArpService);
NetFreePool (ArpService);
} else {
while (!NetListIsEmpty (&ArpService->ChildrenList)) {
Instance = NET_LIST_HEAD (&ArpService->ChildrenList, ARP_INSTANCE_DATA, List);
ServiceBinding->DestroyChild (ServiceBinding, Instance->Handle);
}
ASSERT (NetListIsEmpty (&ArpService->PendingRequestTable));
ASSERT (NetListIsEmpty (&ArpService->DeniedCacheTable));
ASSERT (NetListIsEmpty (&ArpService->ResolvedCacheTable));
}
ASSERT (NetListIsEmpty (&ArpService->PendingRequestTable));
ASSERT (NetListIsEmpty (&ArpService->DeniedCacheTable));
ASSERT (NetListIsEmpty (&ArpService->ResolvedCacheTable));
//
// Uninstall the ARP ServiceBinding protocol.
//
Status = gBS->UninstallMultipleProtocolInterfaces (
NicHandle,
&gEfiArpServiceBindingProtocolGuid,
&ArpService->ServiceBinding,
NULL
);
if (EFI_ERROR (Status)) {
ARP_DEBUG_ERROR (("ArpDriverBindingStop: Failed to uninstall ArpSb, %r.\n", Status));
return Status;
}
//
// Clean the arp servicebinding context data and free the memory allocated.
//
ArpCleanService (ArpService);
NetFreePool (ArpService);
return Status;
return EFI_SUCCESS;
}
/**
Creates a child handle with a set of I/O services.