From: Chris Leech Date: Fri, 3 Jul 2015 11:44:16 +0000 (+0200) Subject: fcoe: EDD parsing patch for i40e X-Git-Tag: 044~82 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9a5bd6804a56d5c3091d26894c5302980b38252e;p=thirdparty%2Fdracut.git fcoe: EDD parsing patch for i40e (cherry picked from commit 4031a2fa642c1db897c1340ad2718301bf873fb3) --- diff --git a/modules.d/95fcoe/fcoe-edd.sh b/modules.d/95fcoe/fcoe-edd.sh index 9ab2d3ebb..fb3dcd776 100755 --- a/modules.d/95fcoe/fcoe-edd.sh +++ b/modules.d/95fcoe/fcoe-edd.sh @@ -9,8 +9,21 @@ fi for disk in /sys/firmware/edd/int13_*; do [ -d $disk ] || continue + if [ -e ${disk}/pci_dev/driver ]; then + driver=`readlink ${disk}/pci_dev/driver` + driver=${driver##*/} + fi + # i40e uses dev_port 1 for a virtual fcoe function + if [ "${driver}" == "i40e" ]; then + dev_port=1 + fi for nic in ${disk}/pci_dev/net/*; do [ -d $nic ] || continue + if [ -n "${dev_port}" -a -e ${nic}/dev_port ]; then + if [ `cat ${nic}/dev_port` -ne ${dev_port} ]; then + continue + fi + fi if [ -e ${nic}/address ]; then fcoe_interface=${nic##*/} if ! [ -e "/tmp/.fcoe-$fcoe_interface" ]; then