Skip to content

Commit 06b27cc

Browse files
igorkulchytskyymergify[bot]
authored andcommitted
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 <[email protected]> Reviewed-by: Nickle Wang <[email protected]> Acked-by Mike Maslenkin <[email protected]> Signed-off-by: Igor Kulchytskyy <[email protected]>
1 parent c9cce5a commit 06b27cc

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1547,25 +1547,26 @@ TestForRequiredProtocols (
15471547
ControllerHandle,
15481548
EFI_OPEN_PROTOCOL_TEST_PROTOCOL
15491549
);
1550+
if (EFI_ERROR (Status)) {
1551+
return EFI_UNSUPPORTED;
1552+
}
1553+
1554+
Status = gBS->OpenProtocol (
1555+
ControllerHandle,
1556+
gRequiredProtocol[Index].DiscoveredProtocolGuid,
1557+
(VOID **)&Id,
1558+
This->DriverBindingHandle,
1559+
ControllerHandle,
1560+
EFI_OPEN_PROTOCOL_GET_PROTOCOL
1561+
);
15501562
if (!EFI_ERROR (Status)) {
1551-
Status = gBS->OpenProtocol (
1552-
ControllerHandle,
1553-
gRequiredProtocol[Index].DiscoveredProtocolGuid,
1554-
(VOID **)&Id,
1555-
This->DriverBindingHandle,
1556-
ControllerHandle,
1557-
EFI_OPEN_PROTOCOL_GET_PROTOCOL
1558-
);
1559-
if (EFI_ERROR (Status)) {
1560-
if (Index == ListCount - 1) {
1561-
DEBUG ((DEBUG_INFO, "%a: all required protocols are found on this controller handle: %p.\n", __func__, ControllerHandle));
1562-
return EFI_SUCCESS;
1563-
}
1564-
}
1563+
// Already installed
1564+
return EFI_UNSUPPORTED;
15651565
}
15661566
}
15671567

1568-
return EFI_UNSUPPORTED;
1568+
DEBUG ((DEBUG_MANAGEABILITY, "%a: all required protocols are found on this controller handle: %p.\n", __func__, ControllerHandle));
1569+
return EFI_SUCCESS;
15691570
}
15701571

15711572
/**

0 commit comments

Comments
 (0)