]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[efi] Continue to connect remaining handles after connection errors
authorMichael Brown <mcb30@ipxe.org>
Wed, 13 Sep 2017 07:07:55 +0000 (10:07 +0300)
committerMichael Brown <mcb30@ipxe.org>
Wed, 13 Sep 2017 07:07:55 +0000 (10:07 +0300)
Some UEFI BIOSes will deliberately break the implementation of
ConnectController() to return errors for devices that have been
"disabled" via the BIOS setup screen.  (As an added bonus, such BIOSes
may return garbage EFI_STATUS values such as 0xff.)

Work around these broken UEFI BIOSes by ignoring failures and
continuing to attempt to connect any remaining handles.

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

index 22aa3ee72fae79e725c95a1bae845661589a3dfa..2cefed2fddb9f9b99e4a44925670828058f995ff 100644 (file)
@@ -497,14 +497,16 @@ static int efi_driver_handles ( int ( * method ) ( EFI_HANDLE handle ) ) {
 
        /* Connect/disconnect driver from all handles */
        for ( i = 0 ; i < num_handles ; i++ ) {
-               if ( ( rc = method ( handles[i] ) ) != 0 )
-                       goto err_method;
+               if ( ( rc = method ( handles[i] ) ) != 0 ) {
+                       /* Ignore errors and continue to process
+                        * remaining handles.
+                        */
+               }
        }
 
        /* Success */
        rc = 0;
 
- err_method:
        bs->FreePool ( handles );
  err_locate:
        return rc;