diff options
author | Liming Gao <gaoliming@byosoft.com.cn> | 2023-11-17 18:00:12 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2023-11-22 13:31:54 +0000 |
commit | 8dd52c949e131dc0663337f77b5651b79a6cb92b (patch) | |
tree | 790fa9a99f8987c17ab9b0982e41ffb5f7541a0b /RedfishPkg | |
parent | 15538bc62eeeeafadfa6afc6ac3f3b2115529568 (diff) | |
download | edk2-8dd52c949e131dc0663337f77b5651b79a6cb92b.tar.gz edk2-8dd52c949e131dc0663337f77b5651b79a6cb92b.tar.bz2 edk2-8dd52c949e131dc0663337f77b5651b79a6cb92b.zip |
Revert "RedfishPkg: RedfishDiscoverDxe: Fix issue if IPv4 installed later"
This reverts commit 06b27ccb90302bffbb34e4ddf31a6e2843dd20f5.
Signed-off-by: Liming Gao <gaoliming@byosoft.com.cn>
Diffstat (limited to 'RedfishPkg')
-rw-r--r-- | RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c b/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c index 0f622e05a9..23da3b968f 100644 --- a/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c +++ b/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c @@ -1547,26 +1547,25 @@ TestForRequiredProtocols ( ControllerHandle,
EFI_OPEN_PROTOCOL_TEST_PROTOCOL
);
- if (EFI_ERROR (Status)) {
- return EFI_UNSUPPORTED;
- }
-
- Status = gBS->OpenProtocol (
- ControllerHandle,
- gRequiredProtocol[Index].DiscoveredProtocolGuid,
- (VOID **)&Id,
- This->DriverBindingHandle,
- ControllerHandle,
- EFI_OPEN_PROTOCOL_GET_PROTOCOL
- );
if (!EFI_ERROR (Status)) {
- // Already installed
- return EFI_UNSUPPORTED;
+ Status = gBS->OpenProtocol (
+ ControllerHandle,
+ gRequiredProtocol[Index].DiscoveredProtocolGuid,
+ (VOID **)&Id,
+ This->DriverBindingHandle,
+ ControllerHandle,
+ EFI_OPEN_PROTOCOL_GET_PROTOCOL
+ );
+ if (EFI_ERROR (Status)) {
+ if (Index == ListCount - 1) {
+ DEBUG ((DEBUG_INFO, "%a: all required protocols are found on this controller handle: %p.\n", __func__, ControllerHandle));
+ return EFI_SUCCESS;
+ }
+ }
}
}
- DEBUG ((DEBUG_MANAGEABILITY, "%a: all required protocols are found on this controller handle: %p.\n", __func__, ControllerHandle));
- return EFI_SUCCESS;
+ return EFI_UNSUPPORTED;
}
/**
|