]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
95fcoe: support bnx2fc
authorHarald Hoyer <harald@redhat.com>
Wed, 9 Nov 2011 13:40:56 +0000 (14:40 +0100)
committerHarald Hoyer <harald@redhat.com>
Tue, 15 Nov 2011 08:47:28 +0000 (09:47 +0100)
To start bnx2fc, we need to run fipvlan only and not dcbtool.  DCBX is run
automatically in the hardware, but VLAN discovery needs to be started by
fipvlan.

https://bugzilla.redhat.com/show_bug.cgi?id=736094

modules.d/95fcoe/fcoe-up
modules.d/95fcoe/module-setup.sh
modules.d/95fcoe/parse-fcoe.sh

index da69c52085b55ada1bd2e6a3d2e135328cf20013..5c5bdb5d82ab685e04d23d81027d1fd908d9aa78 100755 (executable)
@@ -23,6 +23,9 @@ dcb=$2
 ip link set "$netif" up
 wait_for_if_up "$netif"
 
+netdriver=$(readlink -f /sys/class/net/$netif/device/driver)
+netdriver=${netdriver##*/}
+
 if [ "$dcb" = "dcb" ]; then
     # Note lldpad will stay running after switchroot, the system initscripts
     # are to kill it and start a new lldpad to take over. Data is transfered
@@ -35,6 +38,11 @@ if [ "$dcb" = "dcb" ]; then
     dcbtool sc "$netif" app:fcoe e:1 a:1 w:1
     sleep 1
     fipvlan "$netif" -c -s
+elif [ "$netdriver" = "bnx2x" ]; then
+    # If driver is bnx2x, do not use /sys/module/fcoe/parameters/create but fipvlan
+    modprobe 8021q
+    udevadm settle --timeout=30
+    fipvlan "$netif" -c -s
 else
     echo -n "$netif" > /sys/module/fcoe/parameters/create
 fi
index 6beb14a38656bd82f83ae14f0434efebf97c751a..b4cee97bdde3284810c54ce20087d4ca4e787e90 100755 (executable)
@@ -25,6 +25,7 @@ install() {
     inst dcbtool
     inst fipvlan
     inst lldpad
+    inst readlink
 
     mkdir -m 0755 -p "$initdir/var/lib/lldpad"
 
index 08c6722560317fe6587f22ef99cd1a25ffb2b4e3..dc40c825f3f64188285954f8dbc2027e168ea776 100755 (executable)
 # If it's not set we don't continue
 [ -z "$fcoe" ] && return
 
+
+# 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/module/fcoe/parameters/create ] || modprobe -a fcoe || die "FCoE requested but kernel/initrd does not support FCoE"
+
+modprobe bnx2fc >/dev/null 2>&1
+udevadm settle --timeout=30
+
 # FCoE actually supported?
 [ -e /sys/module/fcoe/parameters/create ] || modprobe fcoe || die "FCoE requested but kernel/initrd does not support FCoE"