95fcoe: support bnx2fc

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
master
Harald Hoyer 2011-11-09 14:40:56 +01:00
parent 760dcc6a65
commit f6783bee07
3 changed files with 16 additions and 0 deletions

View File

@ -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

View File

@ -25,6 +25,7 @@ install() {
inst dcbtool
inst fipvlan
inst lldpad
inst readlink

mkdir -m 0755 -p "$initdir/var/lib/lldpad"


View File

@ -20,6 +20,13 @@
# 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"