/etc/functions: fix order when loading usb modules to prevent warning

This commit is contained in:
Thierry Laurion 2023-01-16 15:18:05 -05:00
parent febff85498
commit 256313a988
No known key found for this signature in database
GPG Key ID: E7B4A71658E36A93

View File

@ -93,6 +93,11 @@ confirm_totp()
enable_usb()
{
#insmod ehci_hcd prior of uhdc_hcd and ohci_hcd to suppress dmesg warning
if ! lsmod | grep -q ehci_hcd; then
insmod /lib/modules/ehci-hcd.ko \
|| die "ehci_hcd: module load failed"
fi
if [ "$CONFIG_LINUX_USB_COMPANION_CONTROLLER" = y ]; then
if ! lsmod | grep -q uhci_hcd; then
insmod /lib/modules/uhci-hcd.ko \
@ -107,10 +112,6 @@ enable_usb()
|| die "ohci_pci: module load failed"
fi
fi
if ! lsmod | grep -q ehci_hcd; then
insmod /lib/modules/ehci-hcd.ko \
|| die "ehci_hcd: module load failed"
fi
if ! lsmod | grep -q ehci_pci; then
insmod /lib/modules/ehci-pci.ko \
|| die "ehci_pci: module load failed"