1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-11-01 19:05:51 +01:00

Merge tag 'v2024.01-rc5' into next

Prepare v2024.01-rc5
This commit is contained in:
Tom Rini
2023-12-18 08:31:50 -05:00
78 changed files with 1015 additions and 2227 deletions

View File

@@ -1342,7 +1342,7 @@ static efi_status_t efi_disconnect_all_drivers
const efi_guid_t *protocol,
efi_handle_t child_handle)
{
efi_uintn_t number_of_drivers, tmp;
efi_uintn_t number_of_drivers;
efi_handle_t *driver_handle_buffer;
efi_status_t r, ret;
@@ -1353,27 +1353,13 @@ static efi_status_t efi_disconnect_all_drivers
if (!number_of_drivers)
return EFI_SUCCESS;
tmp = number_of_drivers;
while (number_of_drivers) {
ret = EFI_CALL(efi_disconnect_controller(
r = EFI_CALL(efi_disconnect_controller(
handle,
driver_handle_buffer[--number_of_drivers],
child_handle));
if (ret != EFI_SUCCESS)
goto reconnect;
}
free(driver_handle_buffer);
return ret;
reconnect:
/* Reconnect all disconnected drivers */
for (; number_of_drivers < tmp; number_of_drivers++) {
r = EFI_CALL(efi_connect_controller(handle,
&driver_handle_buffer[number_of_drivers],
NULL, true));
if (r != EFI_SUCCESS)
EFI_PRINT("Failed to reconnect controller\n");
ret = r;
}
free(driver_handle_buffer);
@@ -1412,6 +1398,13 @@ static efi_status_t efi_uninstall_protocol
r = efi_disconnect_all_drivers(handle, protocol, NULL);
if (r != EFI_SUCCESS) {
r = EFI_ACCESS_DENIED;
/*
* This will reconnect all controllers of the handle, even ones
* that were not connected before. This can be done better
* but we are following the EDKII implementation on this for
* now
*/
EFI_CALL(efi_connect_controller(handle, NULL, NULL, true));
goto out;
}
/* Close protocol */