From 0aa61267106111dbde85a9042fd46d8d3164f9be Mon Sep 17 00:00:00 2001 From: Thierry Laurion Date: Fri, 12 Apr 2024 13:56:41 -0400 Subject: [PATCH] ash_functions: move sleep 2 after all usb modules being loaded so that USB Security dongles are sure to be detected prior of "Verifying presence of GPG card" Otherwise we get ehci-pci and xhci_hcd kernel messages pop in dmesg on debug AFTER "Verifying presence of GPG card" which explains why dongle might not be found in time and fails in oem-factory-reset Might be linked to https://github.com/Nitrokey/heads/issues/48 Signed-off-by: Thierry Laurion --- initrd/etc/ash_functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/initrd/etc/ash_functions b/initrd/etc/ash_functions index 8b52ab6a4..9ee01a70d 100644 --- a/initrd/etc/ash_functions +++ b/initrd/etc/ash_functions @@ -324,11 +324,11 @@ enable_usb() insmod /lib/modules/uhci-hcd.ko || die "uhci_hcd: module load failed" insmod /lib/modules/ohci-hcd.ko || die "ohci_hcd: module load failed" insmod /lib/modules/ohci-pci.ko || die "ohci_pci: module load failed" - sleep 2 fi insmod /lib/modules/ehci-pci.ko || die "ehci_pci: module load failed" insmod /lib/modules/xhci-hcd.ko || die "xhci_hcd: module load failed" insmod /lib/modules/xhci-pci.ko || die "xhci_pci: module load failed" + sleep 2 # For resiliency, test CONFIG_USB_KEYBOARD_REQUIRED explicitly rather # than having it imply CONFIG_USER_USB_KEYBOARD at build time.