From 854aaf9024fc70cae31672eb3db1583d8f88e94d Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Sun, 26 Mar 2023 17:08:03 +0200 Subject: scsi: typo supporedt %s/supporedt/supported/ Fixes: edca8cf72130 ("Convert CONFIG_SCSI_AHCI_PLAT et al to Kconfig") Signed-off-by: Heinrich Schuchardt Reviewed-by: Simon Glass --- drivers/scsi/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig index ad484ce8e88..a8014129d33 100644 --- a/drivers/scsi/Kconfig +++ b/drivers/scsi/Kconfig @@ -26,7 +26,7 @@ config SCSI_AHCI_PLAT This is deprecated. An AHCI driver should be provided instead. config SYS_SCSI_MAX_SCSI_ID - int "Maximum supporedt SCSI ID" + int "Maximum supported SCSI ID" default 1 help Sets the maximum number of SCSI IDs to scan when looking for devices. -- cgit v1.3.1 From ffc1cfb8f4cbd2bd28be5877040821ccbda3e08b Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Sun, 26 Mar 2023 02:55:12 +0000 Subject: doc: describe skipping triggering a pipeline in Gitlab 'git push -o ci.skip' can be used to push to Gitlab without triggering a pipeline. Signed-off-by: Heinrich Schuchardt Reviewed-by: Simon Glass --- doc/develop/ci_testing.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/develop/ci_testing.rst b/doc/develop/ci_testing.rst index b9a9a516c1e..ffaacedc3d8 100644 --- a/doc/develop/ci_testing.rst +++ b/doc/develop/ci_testing.rst @@ -50,6 +50,12 @@ runners you are able to provide. While it is intended to be able to run this pipeline on the free public instances provided at https://gitlab.com/ a problem with our squashfs tests currently prevents this. +To push to Gitlab without triggering a pipeline use: + +.. code-block:: bash + + git push -o ci.skip + Docker container ---------------- -- cgit v1.3.1 From a9203b0fefca4627096779e4eb4b1efbea43ec35 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Sun, 26 Mar 2023 12:22:40 +0200 Subject: efi_loader: correct shortening of device-paths We use short device-paths in boot options so that a file on a block device can be found independent of the port into which the device is plugged. Usb() device-path nodes only contain port and interface information and therefore cannot identify a block device. UsbWwi() device-path nodes contain the serial number of USB devices. Signed-off-by: Heinrich Schuchardt --- include/efi_api.h | 1 + lib/efi_loader/efi_device_path.c | 21 ++++++--------------- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/include/efi_api.h b/include/efi_api.h index c57868abbd9..404e9a1171a 100644 --- a/include/efi_api.h +++ b/include/efi_api.h @@ -610,6 +610,7 @@ struct efi_device_path_acpi_path { # define DEVICE_PATH_SUB_TYPE_MSG_MAC_ADDR 0x0b # define DEVICE_PATH_SUB_TYPE_MSG_UART 0x0e # define DEVICE_PATH_SUB_TYPE_MSG_USB_CLASS 0x0f +# define DEVICE_PATH_SUB_TYPE_MSG_USB_WWI 0x10 # define DEVICE_PATH_SUB_TYPE_MSG_SATA 0x12 # define DEVICE_PATH_SUB_TYPE_MSG_NVME 0x17 # define DEVICE_PATH_SUB_TYPE_MSG_URI 0x18 diff --git a/lib/efi_loader/efi_device_path.c b/lib/efi_loader/efi_device_path.c index b6dd575b13b..f35f673ce63 100644 --- a/lib/efi_loader/efi_device_path.c +++ b/lib/efi_loader/efi_device_path.c @@ -124,17 +124,13 @@ int efi_dp_match(const struct efi_device_path *a, /** * efi_dp_shorten() - shorten device-path * - * We can have device paths that start with a USB WWID or a USB Class node, - * and a few other cases which don't encode the full device path with bus - * hierarchy: + * When creating a short boot option we want to use a device-path that is + * independent of the location where the block device is plugged in. * - * * MESSAGING:USB_WWID - * * MESSAGING:USB_CLASS - * * MEDIA:FILE_PATH - * * MEDIA:HARD_DRIVE - * * MESSAGING:URI + * UsbWwi() nodes contain a serial number, hard drive paths a partition + * UUID. Both should be unique. * - * See UEFI spec (section 3.1.2, about short-form device-paths) + * See UEFI spec, section 3.1.2 for "short-form device path". * * @dp: original device-path * @Return: shortened device-path or NULL @@ -142,12 +138,7 @@ int efi_dp_match(const struct efi_device_path *a, struct efi_device_path *efi_dp_shorten(struct efi_device_path *dp) { while (dp) { - /* - * TODO: Add MESSAGING:USB_WWID and MESSAGING:URI.. - * in practice fallback.efi just uses MEDIA:HARD_DRIVE - * so not sure when we would see these other cases. - */ - if (EFI_DP_TYPE(dp, MESSAGING_DEVICE, MSG_USB) || + if (EFI_DP_TYPE(dp, MESSAGING_DEVICE, MSG_USB_WWI) || EFI_DP_TYPE(dp, MEDIA_DEVICE, HARD_DRIVE_PATH) || EFI_DP_TYPE(dp, MEDIA_DEVICE, FILE_PATH)) return dp; -- cgit v1.3.1 From dfd4288173245f0ea03df3e73cf62848c0212d98 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Sat, 1 Apr 2023 07:21:55 +0200 Subject: efi_loader: remove duplicate assignment Assigning the value of a variable to itself should be avoided. Addresses-Coverity-ID: 451089 ("Evaluation order violation") Fixes: 180b7118bed8 ("efi_loader: fix device-path for USB devices") Signed-off-by: Heinrich Schuchardt --- lib/efi_loader/efi_device_path.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/efi_loader/efi_device_path.c b/lib/efi_loader/efi_device_path.c index f35f673ce63..8a65dda8838 100644 --- a/lib/efi_loader/efi_device_path.c +++ b/lib/efi_loader/efi_device_path.c @@ -740,7 +740,7 @@ __maybe_unused static void *dp_fill(void *buf, struct udevice *dev) #endif #if defined(CONFIG_USB) case UCLASS_MASS_STORAGE: { - struct blk_desc *desc = desc = dev_get_uclass_plat(dev); + struct blk_desc *desc = dev_get_uclass_plat(dev); struct efi_device_path_controller *dp = dp_fill(buf, dev->parent); -- cgit v1.3.1