Defer modprobe of HW modules, until udev is running

Also honor blacklisting

(cherry picked from commit 437dad70e9)
Harald Hoyer 2015-04-24 11:54:07 +02:00
parent 26eeb4af8d
commit 7335bd1e23
2 changed files with 4 additions and 10 deletions

View File

@ -22,10 +22,9 @@


# BRCM: Later, should check whether bnx2x is loaded first before loading bnx2fc so do not load bnx2fc when there are no Broadcom adapters
[ -e /sys/bus/fcoe/ctlr_create ] || modprobe -a fcoe || die "FCoE requested but kernel/initrd does not support FCoE"
[ -e /sys/bus/fcoe/ctlr_create ] || modprobe -b -a fcoe || die "FCoE requested but kernel/initrd does not support FCoE"

modprobe bnx2fc >/dev/null 2>&1
udevadm settle --timeout=30
initqueue --onetime modprobe -b -q bnx2fc

# FCoE actually supported?
[ -e /sys/bus/fcoe/ctlr_create ] || modprobe fcoe || die "FCoE requested but kernel/initrd does not support FCoE"

View File

@ -89,16 +89,11 @@ if [ -z "$netroot" ] || ! [ "${netroot%%:*}" = "iscsi" ]; then
fi

initqueue --unique --onetime --timeout /sbin/iscsiroot timeout "$netroot" "$NEWROOT"

modprobe -b -q qla4xxx
modprobe -b -q cxgb3i
modprobe -b -q cxgb4i
modprobe -b -q bnx2i
modprobe -b -q be2iscsi
initqueue --onetime modprobe --all -b -q qla4xxx cxgb3i cxgb4i bnx2i be2iscsi

# ISCSI actually supported?
if ! [ -e /sys/module/iscsi_tcp ]; then
modprobe -q iscsi_tcp || die "iscsiroot requested but kernel/initrd does not support iscsi"
modprobe -b -q iscsi_tcp || die "iscsiroot requested but kernel/initrd does not support iscsi"
fi

if [ -n "$netroot" ] && [ "$root" != "/dev/root" ] && [ "$root" != "dhcp" ]; then