teknoraver / rpms / systemd

Forked from rpms/systemd 4 months ago
Clone

Blame SOURCES/0149-boot-Make-sure-all-partitions-drivers-are-connected.patch

2aacef
From 57b58ec8a72f00a66b43e7975ed3825dc28b851f Mon Sep 17 00:00:00 2001
2aacef
From: Jan Janssen <medhefgo@web.de>
2aacef
Date: Sun, 27 Nov 2022 13:53:30 +0100
2aacef
Subject: [PATCH] boot: Make sure all partitions drivers are connected
2aacef
2aacef
(cherry picked from commit 7f19be808c9cb9cabcaf1e48ccff875fa8191d3a)
2aacef
2aacef
Related: #2138081
2aacef
---
2aacef
 src/boot/efi/xbootldr.c | 4 ++++
2aacef
 1 file changed, 4 insertions(+)
2aacef
2aacef
diff --git a/src/boot/efi/xbootldr.c b/src/boot/efi/xbootldr.c
2aacef
index e5b9ca7268..7fef909312 100644
2aacef
--- a/src/boot/efi/xbootldr.c
2aacef
+++ b/src/boot/efi/xbootldr.c
2aacef
@@ -201,6 +201,10 @@ static EFI_STATUS find_device(EFI_HANDLE *device, EFI_DEVICE_PATH **ret_device_p
2aacef
         if (err != EFI_SUCCESS)
2aacef
                 return err;
2aacef
 
2aacef
+        /* The drivers for other partitions on this drive may not be initialized on fastboot firmware, so we
2aacef
+         * have to ask the firmware to do just that. */
2aacef
+        (void) BS->ConnectController(disk_handle, NULL, NULL, true);
2aacef
+
2aacef
         err = BS->HandleProtocol(disk_handle, &BlockIoProtocol, (void **)&block_io);
2aacef
         if (err != EFI_SUCCESS)
2aacef
                 return err;