From d7431042465cae9314d299022427ed15386a2fed Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Thu, 9 Jan 2020 23:26:43 +0100 Subject: efi_driver: fix efi_uc_stop() Use the correct protocol in efi_uc_stop() when detaching the driver from the controller. Change the block IO unit test for the block device driver to throw an error instead of a todo if teardown fails. Signed-off-by: Heinrich Schuchardt --- lib/efi_driver/efi_uclass.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/efi_driver/efi_uclass.c') diff --git a/lib/efi_driver/efi_uclass.c b/lib/efi_driver/efi_uclass.c index b14746e6b1..40269b00dc 100644 --- a/lib/efi_driver/efi_uclass.c +++ b/lib/efi_driver/efi_uclass.c @@ -197,7 +197,8 @@ static efi_status_t EFIAPI efi_uc_stop( efi_status_t ret; efi_uintn_t count; struct efi_open_protocol_info_entry *entry_buffer; - efi_guid_t *guid_controller = NULL; + struct efi_driver_binding_extended_protocol *bp = + (struct efi_driver_binding_extended_protocol *)this; EFI_ENTRY("%p, %pUl, %zu, %p", this, controller_handle, number_of_children, child_handle_buffer); @@ -217,7 +218,7 @@ static efi_status_t EFIAPI efi_uc_stop( /* Destroy all children */ ret = EFI_CALL(systab.boottime->open_protocol_information( - controller_handle, guid_controller, + controller_handle, bp->ops->protocol, &entry_buffer, &count)); if (ret != EFI_SUCCESS) goto out; @@ -237,7 +238,7 @@ static efi_status_t EFIAPI efi_uc_stop( /* Detach driver from controller */ ret = EFI_CALL(systab.boottime->close_protocol( - controller_handle, guid_controller, + controller_handle, bp->ops->protocol, this->driver_binding_handle, controller_handle)); out: return EFI_EXIT(ret); -- cgit v1.2.3 From 30ed1d4bbbe0501bb86d0a62a08b98d3b084a6c7 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Fri, 10 Jan 2020 12:33:16 +0100 Subject: efi_driver: debug output efi_uc_start, efi_uc_stop Use the correct printf codes for the debug output in efi_uc_start() and efi_uc_stop(). Signed-off-by: Heinrich Schuchardt --- lib/efi_driver/efi_uclass.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/efi_driver/efi_uclass.c') diff --git a/lib/efi_driver/efi_uclass.c b/lib/efi_driver/efi_uclass.c index 40269b00dc..25b27ece6d 100644 --- a/lib/efi_driver/efi_uclass.c +++ b/lib/efi_driver/efi_uclass.c @@ -112,7 +112,7 @@ static efi_status_t EFIAPI efi_uc_start( struct efi_driver_binding_extended_protocol *bp = (struct efi_driver_binding_extended_protocol *)this; - EFI_ENTRY("%p, %pUl, %ls", this, controller_handle, + EFI_ENTRY("%p, %p, %ls", this, controller_handle, efi_dp_str(remaining_device_path)); /* Attach driver to controller */ @@ -200,7 +200,7 @@ static efi_status_t EFIAPI efi_uc_stop( struct efi_driver_binding_extended_protocol *bp = (struct efi_driver_binding_extended_protocol *)this; - EFI_ENTRY("%p, %pUl, %zu, %p", this, controller_handle, + EFI_ENTRY("%p, %p, %zu, %p", this, controller_handle, number_of_children, child_handle_buffer); /* Destroy provided child controllers */ -- cgit v1.2.3