Skip to content

Commit

Permalink
RedfishPkg: RedfishDiscoverDxe: Fix issue if IPv4 installed after RestEx
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
igorkulchytskyy authored and mergify[bot] committed Nov 22, 2023
1 parent 8dd52c9 commit f444c4b
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down

0 comments on commit f444c4b

Please sign in to comment.