]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[efi] Always enable recursion when calling ConnectController()
authorMichael Brown <mcb30@ipxe.org>
Thu, 1 Oct 2020 22:23:10 +0000 (23:23 +0100)
committerMichael Brown <mcb30@ipxe.org>
Thu, 1 Oct 2020 23:36:33 +0000 (00:36 +0100)
There appears to be no reason for avoiding recursion when calling
ConnectController(), and recursion provides the least surprising
behaviour.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/interface/efi/efi_block.c
src/interface/efi/efi_driver.c

index 64d1e1980bbdc5ad93c3f2d8c98c14fd62133dc0..0024fbbea937933c3e0a6ff0d6b9992d6ca0f45b 100644 (file)
@@ -237,7 +237,7 @@ static void efi_block_connect ( struct san_device *sandev ) {
 
        /* Try to connect all possible drivers to this block device */
        if ( ( efirc = bs->ConnectController ( block->handle, NULL,
-                                              NULL, 1 ) ) != 0 ) {
+                                              NULL, TRUE ) ) != 0 ) {
                rc = -EEFI ( efirc );
                DBGC ( sandev, "EFIBLK %#02x could not connect drivers: %s\n",
                       sandev->drive, strerror ( rc ) );
index 760ee41a8ea7464547f0ac0101bd1372f65cd2fe..a6c0f3032e5d0ce0795fd52df97aa1195ba8af65 100644 (file)
@@ -470,7 +470,7 @@ static int efi_driver_connect ( EFI_HANDLE device ) {
        DBGC ( device, "EFIDRV %s connecting new drivers\n",
               efi_handle_name ( device ) );
        if ( ( efirc = bs->ConnectController ( device, drivers, NULL,
-                                              FALSE ) ) != 0 ) {
+                                              TRUE ) ) != 0 ) {
                rc = -EEFI_CONNECT ( efirc );
                DBGC ( device, "EFIDRV %s could not connect new drivers: "
                       "%s\n", efi_handle_name ( device ), strerror ( rc ) );
@@ -520,7 +520,7 @@ static int efi_driver_reconnect ( EFI_HANDLE device ) {
        EFI_BOOT_SERVICES *bs = efi_systab->BootServices;
 
        /* Reconnect any available driver */
-       bs->ConnectController ( device, NULL, NULL, FALSE );
+       bs->ConnectController ( device, NULL, NULL, TRUE );
 
        return 0;
 }