summaryrefslogtreecommitdiff
path: root/modules.d/95fcoe
diff options
context:
space:
mode:
authorHarald Hoyer <harald@redhat.com>2011-05-02 11:25:13 +0200
committerHarald Hoyer <harald@redhat.com>2011-05-02 11:25:13 +0200
commit80df37f475d205ca3b0e2e82fa345d64d681f814 (patch)
tree8ea0a79c487f7d5e8c33a26a4320c26ff5ce8c95 /modules.d/95fcoe
parent979c4a9304fe68dc35fb40bed90b99731721a832 (diff)
downloaddracut-80df37f475d205ca3b0e2e82fa345d64d681f814.tar.gz
dracut-80df37f475d205ca3b0e2e82fa345d64d681f814.tar.bz2
dracut-80df37f475d205ca3b0e2e82fa345d64d681f814.zip
fcoe: moved edd detection to settled initqueue
At the time of modprobing edd, all pci devices must exist and have to be initialized for the symlinks to work.
Diffstat (limited to 'modules.d/95fcoe')
-rwxr-xr-xmodules.d/95fcoe/fcoe-edd.sh25
-rwxr-xr-xmodules.d/95fcoe/module-setup.sh2
-rwxr-xr-xmodules.d/95fcoe/parse-fcoe.sh15
3 files changed, 27 insertions, 15 deletions
diff --git a/modules.d/95fcoe/fcoe-edd.sh b/modules.d/95fcoe/fcoe-edd.sh
new file mode 100755
index 00000000..5a81a2e3
--- /dev/null
+++ b/modules.d/95fcoe/fcoe-edd.sh
@@ -0,0 +1,25 @@
+#!/bin/sh
+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
+# ex: ts=8 sw=4 sts=4 et filetype=sh
+
+dcb=$1
+
+if ! [ -d /sys/firmware/edd ]; then
+ modprobe edd
+ while ! [ -d /sys/firmware/edd ]; do sleep 0.1; done
+fi
+
+for disk in /sys/firmware/edd/int13_*; do
+ [ -d $disk ] || continue
+ for nic in ${disk}/pci_dev/net/*; do
+ [ -d $nic ] || continue
+ if [ -e ${nic}/address ]; then
+ fcoe_interface=${nic##*/}
+ if ! [ -e "/tmp/.fcoe-$fcoe_interface" ]; then
+ /sbin/fcoe-up $fcoe_interface $dcb
+ > "/tmp/.fcoe-$fcoe_interface"
+ fi
+ fi
+ done
+done
+modprobe -r edd
diff --git a/modules.d/95fcoe/module-setup.sh b/modules.d/95fcoe/module-setup.sh
index 2ebff092..67388364 100755
--- a/modules.d/95fcoe/module-setup.sh
+++ b/modules.d/95fcoe/module-setup.sh
@@ -29,8 +29,8 @@ install() {
mkdir -m 0755 -p "$initdir/var/lib/lldpad"
inst "$moddir/fcoe-up" "/sbin/fcoe-up"
+ inst "$moddir/fcoe-edd.sh" "/sbin/fcoe-edd"
inst "$moddir/fcoe-genrules.sh" "/sbin/fcoe-genrules.sh"
- inst_hook pre-udev 60 "$moddir/fcoe-genrules.sh"
inst_hook cmdline 99 "$moddir/parse-fcoe.sh"
}
diff --git a/modules.d/95fcoe/parse-fcoe.sh b/modules.d/95fcoe/parse-fcoe.sh
index ab80d78b..08c67225 100755
--- a/modules.d/95fcoe/parse-fcoe.sh
+++ b/modules.d/95fcoe/parse-fcoe.sh
@@ -51,20 +51,7 @@ if [ "$fcoe_interface" = "edd" ]; then
if [ "$fcoe_dcb" != "nodcb" -a "$fcoe_dcb" != "dcb" ] ; then
warn "Invalid FCoE DCB option: $fcoe_dcb"
fi
- [ -d /sys/firmware/edd ] || modprobe edd
- # parse edd interfaces
- for disk in /sys/firmware/edd/int13_*; do
- [ -d $disk ] || continue
- for nic in ${disk}/pci_dev/net/*; do
- [ -d $nic ] || continue
- if [ -e ${nic}/address ]; then
- unset fcoe_mac
- unset fcoe_interface
- fcoe_mac=$(cat ${nic}/address)
- [ -n "$fcoe_mac" ] && . $(command -v fcoe-genrules.sh)
- fi
- done
- done
+ /sbin/initqueue --settled --unique /sbin/fcoe-edd $fcoe_dcb
else
for fcoe in $(getargs fcoe=); do
unset fcoe_mac