efi_loader: fix device-path for USB devices
EFI device paths for block devices must be unique. If a non-unique device
path is discovered, probing of the block device fails.

Currently we use UsbClass() device path nodes. As multiple devices may
have the same vendor and product id these are non-unique. Instead we
should use Usb() device path nodes. They include the USB port on the
parent hub. Hence they are unique.

A USB storage device may contain multiple logical units. These can be
modeled as Ctrl() nodes.

[Backport of commit e472ef8a3d5e ("efi_loader: fix device-path for
 USB devices")]

Reported-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Change-Id: Ie4c356c0b597fcd8b461c2e0d219740db4a8473d
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/u-boot/+/297489
Tested-by: Patrick DELAUNAY <patrick.delaunay@foss.st.com>
Reviewed-by: Patrick DELAUNAY <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice CHOTARD <patrice.chotard@foss.st.com>
ACI: CIBUILD <MDG-smet-aci-builds@list.st.com>
Domain-Review: Patrice CHOTARD <patrice.chotard@foss.st.com>
1 parent 2ff9b30 commit 8f9c09de0d99dee7cb748e967830506591002912
@Heinrich Schuchardt Heinrich Schuchardt authored on 19 Mar 2023
Patrice Chotard committed on 1 Jun 2023
Showing 1 changed file
View
lib/efi_loader/efi_device_path.c