Skip to content

Commit

Permalink
[efi] Always enable recursion when calling ConnectController()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
mcb30 committed Oct 1, 2020
1 parent fbb5989 commit c70b3e0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/interface/efi/efi_block.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) );
Expand Down
4 changes: 2 additions & 2 deletions src/interface/efi/efi_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) );
Expand Down Expand Up @@ -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;
}
Expand Down

4 comments on commit c70b3e0

@RESP3CT88
Copy link

@RESP3CT88 RESP3CT88 commented on c70b3e0 Oct 14, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit causes iPXE not to load any of my OS images (Ubuntu, WinPE). When using a Lenovo Thinkpad T440 with the i218lm driver. It just hangs on the "boot" command. @mcb30

@toreanderson
Copy link
Contributor

@toreanderson toreanderson commented on c70b3e0 Oct 19, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit causes iPXE not to load any of my OS images (Ubuntu, WinPE). When using a Lenovo Thinkpad T440 with the i218lm driver. It just hangs on the "boot" command.

@RESP3CT88 this is probably the same as issue #159.

@PicoMitchell
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#164 appears to be caused by this commit as well.

@mcb30
Copy link
Member Author

@mcb30 mcb30 commented on c70b3e0 Nov 23, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit 1295b4a should clear up any UEFI firmware bugs that were exposed by this commit.

Please sign in to comment.