Search
j0ke.net Open Build Service
>
Projects
>
home:jg
:
playground
>
dracut
> 0204-fcoe-moved-edd-detection-to-settled-initqueue.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File 0204-fcoe-moved-edd-detection-to-settled-initqueue.patch of Package dracut
From ead064e33d6fcbfdc3277534b11686dcfd06e94a Mon Sep 17 00:00:00 2001 From: Harald Hoyer <harald@redhat.com> Date: Tue, 19 Apr 2011 11:41:45 +0200 Subject: [PATCH] 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. --- modules.d/95fcoe/fcoe-edd.sh | 23 +++++++++++++++++++++++ modules.d/95fcoe/install | 1 + modules.d/95fcoe/parse-fcoe.sh | 15 +-------------- 3 files changed, 25 insertions(+), 14 deletions(-) create mode 100755 modules.d/95fcoe/fcoe-edd.sh diff --git a/modules.d/95fcoe/fcoe-edd.sh b/modules.d/95fcoe/fcoe-edd.sh new file mode 100755 index 0000000..96c52ad --- /dev/null +++ b/modules.d/95fcoe/fcoe-edd.sh @@ -0,0 +1,23 @@ +#!/bin/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 \ No newline at end of file diff --git a/modules.d/95fcoe/install b/modules.d/95fcoe/install index d022f6c..9248de9 100755 --- a/modules.d/95fcoe/install +++ b/modules.d/95fcoe/install @@ -9,5 +9,6 @@ inst vconfig mkdir -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 cmdline 99 "$moddir/parse-fcoe.sh" diff --git a/modules.d/95fcoe/parse-fcoe.sh b/modules.d/95fcoe/parse-fcoe.sh index 4f851a3..84da44a 100755 --- a/modules.d/95fcoe/parse-fcoe.sh +++ b/modules.d/95fcoe/parse-fcoe.sh @@ -49,20 +49,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" ] && . /sbin/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 -- 1.8.3.1