Procházet zdrojové kódy

[efi] Continue to connect remaining handles after connection errors

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>
tags/v1.20.1
Michael Brown před 7 roky
rodič
revize
d46c53cfc6
1 změnil soubory, kde provedl 5 přidání a 3 odebrání
  1. 5
    3
      src/interface/efi/efi_driver.c

+ 5
- 3
src/interface/efi/efi_driver.c Zobrazit soubor

@@ -497,14 +497,16 @@ static int efi_driver_handles ( int ( * method ) ( EFI_HANDLE handle ) ) {
497 497
 
498 498
 	/* Connect/disconnect driver from all handles */
499 499
 	for ( i = 0 ; i < num_handles ; i++ ) {
500
-		if ( ( rc = method ( handles[i] ) ) != 0 )
501
-			goto err_method;
500
+		if ( ( rc = method ( handles[i] ) ) != 0 ) {
501
+			/* Ignore errors and continue to process
502
+			 * remaining handles.
503
+			 */
504
+		}
502 505
 	}
503 506
 
504 507
 	/* Success */
505 508
 	rc = 0;
506 509
 
507
- err_method:
508 510
 	bs->FreePool ( handles );
509 511
  err_locate:
510 512
 	return rc;

Načítá se…
Zrušit
Uložit