|
|
a0a3b4 |
From bff5416520f950942b4040ed10281d2ccaf9f09a Mon Sep 17 00:00:00 2001
|
|
|
a0a3b4 |
From: Hannes Reinecke <hare@suse.de>
|
|
|
a0a3b4 |
Date: Thu, 25 Feb 2016 20:58:11 +0800
|
|
|
a0a3b4 |
Subject: [PATCH] 95iscsi: Fixup bnx2i offload booting
|
|
|
a0a3b4 |
|
|
|
a0a3b4 |
bnx2i is using a separate iSCSI offload engine with a separate
|
|
|
a0a3b4 |
MAC address. As a result, the iBFT information is displaying
|
|
|
a0a3b4 |
a MAC address which does not relate to any MAC address from
|
|
|
a0a3b4 |
the network interfaces.
|
|
|
a0a3b4 |
In addition, the iSCSI offload engine works independently on
|
|
|
a0a3b4 |
the NIC, so we do not need to enable the NIC for iSCSI offload
|
|
|
a0a3b4 |
to work.
|
|
|
a0a3b4 |
This patch modifies the automatic iBFT detection to not set
|
|
|
a0a3b4 |
the 'ip=ibft' flag when bnx2i offload is detected.
|
|
|
a0a3b4 |
|
|
|
a0a3b4 |
References: bnc#855747
|
|
|
a0a3b4 |
|
|
|
a0a3b4 |
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
|
|
a0a3b4 |
Signed-off-by: Thomas Renninger <trenn@suse.de>
|
|
|
a0a3b4 |
---
|
|
|
a0a3b4 |
modules.d/95iscsi/module-setup.sh | 26 +++++++++++++++++++++++++-
|
|
|
a0a3b4 |
1 file changed, 25 insertions(+), 1 deletion(-)
|
|
|
a0a3b4 |
|
|
|
a0a3b4 |
diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh
|
|
|
a0a3b4 |
index 422bea7..181da3c 100755
|
|
|
a0a3b4 |
--- a/modules.d/95iscsi/module-setup.sh
|
|
|
a0a3b4 |
+++ b/modules.d/95iscsi/module-setup.sh
|
|
|
a0a3b4 |
@@ -29,14 +29,38 @@ check() {
|
|
|
a0a3b4 |
return 0
|
|
|
a0a3b4 |
}
|
|
|
a0a3b4 |
|
|
|
a0a3b4 |
+get_ibft_mod() {
|
|
|
a0a3b4 |
+ local ibft_mac=$1
|
|
|
a0a3b4 |
+ # Return the iSCSI offload module for a given MAC address
|
|
|
a0a3b4 |
+ iscsiadm -m iface | while read iface_name iface_desc ; do
|
|
|
a0a3b4 |
+ IFS=$','
|
|
|
a0a3b4 |
+ set -- $iface_desc
|
|
|
a0a3b4 |
+ if [ "$ibft_mac" = "$2" ] ; then
|
|
|
a0a3b4 |
+ echo $1
|
|
|
a0a3b4 |
+ return 0
|
|
|
a0a3b4 |
+ fi
|
|
|
a0a3b4 |
+ unset IFS
|
|
|
a0a3b4 |
+ done
|
|
|
a0a3b4 |
+}
|
|
|
a0a3b4 |
+
|
|
|
a0a3b4 |
install_ibft() {
|
|
|
a0a3b4 |
# When iBFT / iscsi_boot is detected:
|
|
|
a0a3b4 |
# - Use 'ip=ibft' to set up iBFT network interface
|
|
|
a0a3b4 |
+ # Note: bnx2i is using a different MAC address of iSCSI offloading
|
|
|
a0a3b4 |
+ # so the 'ip=ibft' parameter must not be set
|
|
|
a0a3b4 |
# - specify firmware booting cmdline parameter
|
|
|
a0a3b4 |
|
|
|
a0a3b4 |
for d in /sys/firmware/* ; do
|
|
|
a0a3b4 |
+ if [ -d ${d}/ethernet0 ] ; then
|
|
|
a0a3b4 |
+ read ibft_mac < ${d}/ethernet0/mac
|
|
|
a0a3b4 |
+ ibft_mod=$(get_ibft_mod $ibft_mac)
|
|
|
a0a3b4 |
+ fi
|
|
|
a0a3b4 |
+ if [ -z "$ibft_mod" ] && [ -d ${d}/ethernet1 ] ; then
|
|
|
a0a3b4 |
+ read ibft_mac < ${d}/ethernet1/mac
|
|
|
a0a3b4 |
+ ibft_mod=$(get_ibft_mod $ibft_mac)
|
|
|
a0a3b4 |
+ fi
|
|
|
a0a3b4 |
if [ -d ${d}/initiator ] ; then
|
|
|
a0a3b4 |
- if [ ${d##*/} = "ibft" ] ; then
|
|
|
a0a3b4 |
+ if [ ${d##*/} = "ibft" ] && [ "$ibft_mod" != "bnx2i" ] ; then
|
|
|
a0a3b4 |
echo -n "ip=ibft "
|
|
|
a0a3b4 |
fi
|
|
|
a0a3b4 |
echo -n "rd.iscsi.firmware=1"
|