37 lines
1.2 KiB
Diff
37 lines
1.2 KiB
Diff
|
From 9a5bd6804a56d5c3091d26894c5302980b38252e Mon Sep 17 00:00:00 2001
|
||
|
From: Chris Leech <cleech@redhat.com>
|
||
|
Date: Fri, 3 Jul 2015 13:44:16 +0200
|
||
|
Subject: [PATCH] fcoe: EDD parsing patch for i40e
|
||
|
|
||
|
(cherry picked from commit 4031a2fa642c1db897c1340ad2718301bf873fb3)
|
||
|
---
|
||
|
modules.d/95fcoe/fcoe-edd.sh | 13 +++++++++++++
|
||
|
1 file changed, 13 insertions(+)
|
||
|
|
||
|
diff --git a/modules.d/95fcoe/fcoe-edd.sh b/modules.d/95fcoe/fcoe-edd.sh
|
||
|
index 9ab2d3e..fb3dcd7 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
|