diff options
author | Igor Kulchytskyy <igork@ami.com> | 2023-11-14 21:52:51 -0500 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2023-11-22 13:31:54 +0000 |
commit | f444c4bea5125ebc2b8b92ec03ab8d11c5c183bf (patch) | |
tree | 2d51ddb95af15247f84165b78a576dd0c4397983 | |
parent | 8dd52c949e131dc0663337f77b5651b79a6cb92b (diff) | |
download | edk2-f444c4bea5125ebc2b8b92ec03ab8d11c5c183bf.tar.gz |
RedfishPkg: RedfishDiscoverDxe: Fix issue if IPv4 installed after RestEx
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4602
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>
Acked-by: Leif Lindholm <quic_llindhol@quicinc.com>
-rw-r--r-- | RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c | 31 |
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;
}
/**
|