From: Johannes Thumshirn Date: Tue, 27 Sep 2016 10:41:22 +0000 (+0200) Subject: 95fcoe: Reorder initialisation for bnx2x X-Git-Tag: 047~51^2~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6b96b50d2cd92d6598240e6061a81b29b889ecdd;p=thirdparty%2Fdracut.git 95fcoe: Reorder initialisation for bnx2x Check first if we're running off an bnx2x device and start FCoE on it via fipvlan, then go the normal/Intel way of starting DCB. Also the SUSE version of fcoemon needs the yes parameter for the --syslog option References: bsc#982588 Signed-off-by: Johannes Thumshirn --- diff --git a/modules.d/95fcoe/fcoe-up.sh b/modules.d/95fcoe/fcoe-up.sh index ddc87b1c6..ecd007d7e 100755 --- a/modules.d/95fcoe/fcoe-up.sh +++ b/modules.d/95fcoe/fcoe-up.sh @@ -27,6 +27,13 @@ fi ip link set dev $netif up linkup "$netif" +# Some fcoemon implementations expect --syslog=true +syslogopt="--syslog" +if fcoemon -h|grep syslog|grep -q yes; then + fcoemonyes="$syslogopt=yes" +fi + + netdriver=$(readlink -f /sys/class/net/$netif/device/driver) netdriver=${netdriver##*/} @@ -45,7 +52,16 @@ write_fcoemon_cfg() { echo MODE=\"fabric\" >> /etc/fcoe/cfg-$netif } -if [ "$dcb" = "dcb" ]; then +if [ "$netdriver" = "bnx2x" ]; then + # If driver is bnx2x, do not use /sys/module/fcoe/parameters/create but fipvlan + modprobe 8021q + udevadm settle --timeout=30 + # Sleep for 13 s to allow dcb negotiation + sleep 13 + write_fcoemon_cfg + fcoemon $syslogopt + fipvlan -c -s "$netif" +elif [ "$dcb" = "dcb" ]; then # wait for lldpad to be ready i=0 while [ $i -lt 60 ]; do @@ -79,18 +95,11 @@ if [ "$dcb" = "dcb" ]; then sleep 1 write_fcoemon_cfg - fcoemon --syslog -elif [ "$netdriver" = "bnx2x" ]; then - # If driver is bnx2x, do not use /sys/module/fcoe/parameters/create but fipvlan - modprobe 8021q - udevadm settle --timeout=30 - # Sleep for 13 s to allow dcb negotiation - sleep 13 - fipvlan "$netif" -c -s + fcoemon $syslogopt else vlan="no" write_fcoemon_cfg - fcoemon --syslog + fcoemon $syslogopt fi need_shutdown