summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgor Kulchytskyy <igork@ami.com>2023-11-14 21:52:51 -0500
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-11-15 03:50:39 +0000
commit06b27ccb90302bffbb34e4ddf31a6e2843dd20f5 (patch)
treef12a5f9f30d36eb2d9011feaf8a4888b8be0281b
parentc9cce5a00591dc437c258f0365b5d434c628b1e0 (diff)
downloadedk2-06b27ccb90302bffbb34e4ddf31a6e2843dd20f5.tar.gz
edk2-06b27ccb90302bffbb34e4ddf31a6e2843dd20f5.tar.bz2
edk2-06b27ccb90302bffbb34e4ddf31a6e2843dd20f5.zip
RedfishPkg: RedfishDiscoverDxe: Fix issue if IPv4 installed after RestEx
Supported function of the driver changed to wait for all network interface to be installed. Reviewed-by: Abner Chang <abner.chang@amd.com> Reviewed-by: Nickle Wang <nicklew@nvidia.com> Acked-by Mike Maslenkin <mike.maslenkin@gmail.com> Signed-off-by: Igor Kulchytskyy <igork@ami.com>
-rw-r--r--RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c b/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c
index 23da3b968f..0f622e05a9 100644
--- a/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c
+++ b/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c
@@ -1547,25 +1547,26 @@ 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)) {
- 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;
- }
- }
+ // Already installed
+ return EFI_UNSUPPORTED;
}
}
- return EFI_UNSUPPORTED;
+ DEBUG ((DEBUG_MANAGEABILITY, "%a: all required protocols are found on this controller handle: %p.\n", __func__, ControllerHandle));
+ return EFI_SUCCESS;
}
/**