[PATCH 2/2] efi: remove error in efi_disk_remove

Heinrich Schuchardt xypron.glpk at gmx.de
Thu Mar 9 12:49:21 CET 2023

On 3/9/23 11:59, Patrick DELAUNAY wrote:
> On 3/9/23 09:54, Heinrich Schuchardt wrote:
>> On 3/8/23 14:26, Patrick Delaunay wrote:
>>> EFI has no reason to block the driver remove when the associated EFI
>>> resources failed to be released.
>>> This patch avoids DM issue when an EFI resource can't be released,
>>> for example if this resource wasn't created, for duplicated device name
>>> Without this patch, the U-Boot device tree is not updated for "usb stop"
>>> command because EFI stack can't free a resource; in usb_stop(), the
>>> remove operation is stopped on first device_remove() error, including a
>>> device_notify() error on any chil
>> The typical reason to return an error here is that the EFI device is
>> still in use, i.e. a protocol installed on the EFI handle is opened by a
>> child controller or driver. As long as the EFI handle cannot be removed
>> we must not remove the linked DM device or we corrupt our data model.
>> Best regards
>> Heinrich
> Ok
> I get it now,
> Forget my serie
> Patrick

Hello Patrick,

thanks a lot for pointing out the issues with non-unique device paths.

As it will take some time to clean up the device path generation patch 1
of the series may still make sense to avoid trouble for users using
multiple USB devices.

Best regards


More information about the U-Boot mailing list