Browse Source

[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 7 years ago
parent
commit
d46c53cfc6
1 changed files with 5 additions and 3 deletions
  1. 5
    3
      src/interface/efi/efi_driver.c

+ 5
- 3
src/interface/efi/efi_driver.c View File

497
 
497
 
498
 	/* Connect/disconnect driver from all handles */
498
 	/* Connect/disconnect driver from all handles */
499
 	for ( i = 0 ; i < num_handles ; i++ ) {
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
 	/* Success */
507
 	/* Success */
505
 	rc = 0;
508
 	rc = 0;
506
 
509
 
507
- err_method:
508
 	bs->FreePool ( handles );
510
 	bs->FreePool ( handles );
509
  err_locate:
511
  err_locate:
510
 	return rc;
512
 	return rc;

Loading…
Cancel
Save