Merge pull request #908 from c-po/current

intel: T6847: fix build system to perform proper "git clone" on IXGBE driver
This commit is contained in:
Christian Breunig 2025-02-15 10:06:06 +01:00 committed by GitHub
commit 10ce9543b9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 64 additions and 64 deletions

View File

@ -14,6 +14,11 @@ fi
. ${KERNEL_VAR_FILE}
if [ -z $KERNEL_DIR ]; then
echo "KERNEL_DIR not defined"
exit 1
fi
cd ${CWD}/ethernet-linux-ixgbe
if [ -d .git ]; then
git clean --force -d -x
@ -29,23 +34,16 @@ DEBIAN_DIR="${CWD}/vyos-intel-${DRIVER_NAME}_${DRIVER_VERSION}_${DEBIAN_ARCH}"
DEBIAN_CONTROL="${DEBIAN_DIR}/DEBIAN/control"
DEBIAN_POSTINST="${CWD}/vyos-intel-ixgbe.postinst"
if [ -z $KERNEL_DIR ]; then
echo "KERNEL_DIR not defined"
exit 1
fi
# See https://lore.kernel.org/lkml/f90837d0-810e-5772-7841-28d47c44d260@intel.com/
echo "I: remove pci_enable_pcie_error_reporting() code no longer present in Kernel"
sed -i '/.*pci_disable_pcie_error_reporting(pdev);/d' src/ixgbe_main.c
sed -i '/.*pci_enable_pcie_error_reporting(pdev);/d' src/ixgbe_main.c
# See https://vyos.dev/T6155
echo "I: always enable allow_unsupported_sfp for all NICs by default"
patch -l -p1 < ../patches/ixgbe/allow_unsupported_sfp.patch
# See https://vyos.dev/T6162
echo "I: add 1000BASE-BX support"
patch -l -p1 < ../patches/ixgbe/add_1000base-bx_support.patch
PATCH_DIR=${CWD}/patches/ixgbe
if [ -d $PATCH_DIR ]; then
for patch in $(ls ${PATCH_DIR})
do
echo "I: Apply patch: ${PATCH_DIR}/${patch}"
patch -p1 < ${PATCH_DIR}/${patch}
done
fi
echo "I: Compile Kernel module for Intel ${DRIVER_NAME} driver"
make KSRC=${KERNEL_DIR} INSTALL_MOD_PATH=${DEBIAN_DIR} INSTALL_FW_PATH=${DEBIAN_DIR} -j $(getconf _NPROCESSORS_ONLN) -C src install

View File

@ -132,7 +132,7 @@ def build_package(package: dict, dependencies: list) -> None:
elif package['build_cmd'] == 'build_intel_qat':
build_intel_qat()
elif package['build_cmd'] == 'build_intel_ixgbe':
build_intel_ixgbe()
build_intel_ixgbe(package['commit_id'], package['scm_url'])
elif package['build_cmd'] == 'build_intel_ixgbevf':
build_intel_ixgbevf()
elif package['build_cmd'] == 'build_mellanox_ofed':
@ -215,8 +215,10 @@ def build_intel_qat():
run(['./build-intel-qat.sh'], check=True)
def build_intel_ixgbe():
def build_intel_ixgbe(commit_id, scm_url):
"""Build Intel IXGBE"""
repo_dir = Path('ethernet-linux-ixgbe')
clone_or_update_repo(repo_dir, scm_url, commit_id)
run(['./build-intel-ixgbe.sh'], check=True)

View File

@ -1,16 +1,16 @@
From 4f6c1dc3c48a1b2fa7c06206e6366bcfaa33f3f7 Mon Sep 17 00:00:00 2001
From a3ebb453f4a8c95fe3674d09646edb93946d450a Mon Sep 17 00:00:00 2001
From: Christian Breunig <christian@breunig.cc>
Date: Fri, 22 Mar 2024 11:33:27 +0000
Date: Sat, 15 Feb 2025 09:17:10 +0100
Subject: [PATCH] ixgbe: always enable support for unsupported SFP+ modules
---
ixgbe_param.c | 10 +++++++---
src/ixgbe_param.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/ixgbe_param.c b/ixgbe_param.c
index 71197b7..dac33ca 100644
--- a/ixgbe_param.c
+++ b/ixgbe_param.c
diff --git a/src/ixgbe_param.c b/src/ixgbe_param.c
index bba03ae..3f29492 100644
--- a/src/ixgbe_param.c
+++ b/src/ixgbe_param.c
@@ -307,7 +307,7 @@ IXGBE_PARAM(LRO, "Large Receive Offload (0,1), default 0 = off");
* Default Value: 0
*/
@ -20,7 +20,7 @@ index 71197b7..dac33ca 100644
/* Enable/disable support for DMA coalescing
*
@@ -1133,8 +1133,8 @@ void ixgbe_check_options(struct ixgbe_adapter *adapter)
@@ -1135,8 +1135,8 @@ void ixgbe_check_options(struct ixgbe_adapter *adapter)
struct ixgbe_option opt = {
.type = enable_option,
.name = "allow_unsupported_sfp",
@ -31,7 +31,7 @@ index 71197b7..dac33ca 100644
};
#ifdef module_param_array
if (num_allow_unsupported_sfp > bd) {
@@ -1150,7 +1150,11 @@ void ixgbe_check_options(struct ixgbe_adapter *adapter)
@@ -1152,7 +1152,11 @@ void ixgbe_check_options(struct ixgbe_adapter *adapter)
}
#ifdef module_param_array
} else {
@ -44,5 +44,5 @@ index 71197b7..dac33ca 100644
#endif
}
--
2.39.2
2.39.5

View File

@ -1,7 +1,7 @@
From 02491fc5cb9bfd0905cfa481d3a6156167fa1720 Mon Sep 17 00:00:00 2001
From: Ernesto Castellotti <ernesto@castellotti.net>
Date: Sat, 23 Mar 2024 12:57:56 +0100
Subject: [BACKPORT linux v6.9] [PATCH] ixgbe: Add 1000BASE-BX support
From 0ef6088d0d93fcda7adee59fe675f96bcae36c13 Mon Sep 17 00:00:00 2001
From: Christian Breunig <christian@breunig.cc>
Date: Sat, 15 Feb 2025 09:17:35 +0100
Subject: [PATCH] [BACKPORT linux v6.9] [PATCH] ixgbe: Add 1000BASE-BX support
Added support for 1000BASE-BX, i.e. Gigabit Ethernet over single strand
of single-mode fiber.
@ -94,17 +94,17 @@ Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Link: https://lore.kernel.org/r/20240301184806.2634508-3-anthony.l.nguyen@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
ixgbe_82599.c | 4 +++-
ixgbe_ethtool.c | 4 ++++
ixgbe_phy.c | 33 +++++++++++++++++++++++++++++----
ixgbe_phy.h | 2 ++
ixgbe_type.h | 2 ++
src/ixgbe_82599.c | 4 +++-
src/ixgbe_ethtool.c | 4 ++++
src/ixgbe_phy.c | 33 +++++++++++++++++++++++++++++----
src/ixgbe_phy.h | 2 ++
src/ixgbe_type.h | 2 ++
5 files changed, 40 insertions(+), 5 deletions(-)
diff --git a/ixgbe_82599.c b/ixgbe_82599.c
index 75e368f..b0a10de 100644
--- a/ixgbe_82599.c
+++ b/ixgbe_82599.c
diff --git a/src/ixgbe_82599.c b/src/ixgbe_82599.c
index c95fc4f..a5c74df 100644
--- a/src/ixgbe_82599.c
+++ b/src/ixgbe_82599.c
@@ -395,7 +395,9 @@ s32 ixgbe_get_link_capabilities_82599(struct ixgbe_hw *hw,
hw->phy.sfp_type == ixgbe_sfp_type_1g_lx_core0 ||
hw->phy.sfp_type == ixgbe_sfp_type_1g_lx_core1 ||
@ -116,10 +116,10 @@ index 75e368f..b0a10de 100644
*speed = IXGBE_LINK_SPEED_1GB_FULL;
*autoneg = true;
goto out;
diff --git a/ixgbe_ethtool.c b/ixgbe_ethtool.c
index 7ada455..fb16f3c 100644
--- a/ixgbe_ethtool.c
+++ b/ixgbe_ethtool.c
diff --git a/src/ixgbe_ethtool.c b/src/ixgbe_ethtool.c
index e983035..7dc9343 100644
--- a/src/ixgbe_ethtool.c
+++ b/src/ixgbe_ethtool.c
@@ -412,6 +412,8 @@ static int ixgbe_get_link_ksettings(struct net_device *netdev,
case ixgbe_sfp_type_1g_sx_core1:
case ixgbe_sfp_type_1g_lx_core0:
@ -138,11 +138,11 @@ index 7ada455..fb16f3c 100644
ecmd->supported |= SUPPORTED_FIBRE;
ecmd->advertising |= ADVERTISED_FIBRE;
ecmd->port = PORT_FIBRE;
diff --git a/ixgbe_phy.c b/ixgbe_phy.c
index 647fdba..0f39fd8 100644
--- a/ixgbe_phy.c
+++ b/ixgbe_phy.c
@@ -1266,6 +1266,7 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
diff --git a/src/ixgbe_phy.c b/src/ixgbe_phy.c
index 3d99a88..3632234 100644
--- a/src/ixgbe_phy.c
+++ b/src/ixgbe_phy.c
@@ -1268,6 +1268,7 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
u8 comp_codes_1g = 0;
u8 comp_codes_10g = 0;
u8 oui_bytes[3] = {0, 0, 0};
@ -150,7 +150,7 @@ index 647fdba..0f39fd8 100644
u8 cable_tech = 0;
u8 cable_spec = 0;
u16 enforce_sfp = 0;
@@ -1309,6 +1310,12 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
@@ -1311,6 +1312,12 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
IXGBE_SFF_CABLE_TECHNOLOGY,
&cable_tech);
@ -163,7 +163,7 @@ index 647fdba..0f39fd8 100644
if (status != IXGBE_SUCCESS)
goto err_read_i2c_eeprom;
@@ -1391,6 +1398,18 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
@@ -1393,6 +1400,18 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
else
hw->phy.sfp_type =
ixgbe_sfp_type_1g_lx_core1;
@ -182,7 +182,7 @@ index 647fdba..0f39fd8 100644
} else {
hw->phy.sfp_type = ixgbe_sfp_type_unknown;
}
@@ -1481,7 +1500,9 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
@@ -1483,7 +1502,9 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
hw->phy.sfp_type == ixgbe_sfp_type_1g_lx_core0 ||
hw->phy.sfp_type == ixgbe_sfp_type_1g_lx_core1 ||
hw->phy.sfp_type == ixgbe_sfp_type_1g_sx_core0 ||
@ -193,7 +193,7 @@ index 647fdba..0f39fd8 100644
hw->phy.type = ixgbe_phy_sfp_unsupported;
status = IXGBE_ERR_SFP_NOT_SUPPORTED;
goto out;
@@ -1500,7 +1521,9 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
@@ -1502,7 +1523,9 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
hw->phy.sfp_type == ixgbe_sfp_type_1g_lx_core0 ||
hw->phy.sfp_type == ixgbe_sfp_type_1g_lx_core1 ||
hw->phy.sfp_type == ixgbe_sfp_type_1g_sx_core0 ||
@ -204,7 +204,7 @@ index 647fdba..0f39fd8 100644
/* Make sure we're a supported PHY type */
if (hw->phy.type == ixgbe_phy_sfp_intel) {
status = IXGBE_SUCCESS;
@@ -1819,12 +1842,14 @@ s32 ixgbe_get_sfp_init_sequence_offsets(struct ixgbe_hw *hw,
@@ -1821,12 +1844,14 @@ s32 ixgbe_get_sfp_init_sequence_offsets(struct ixgbe_hw *hw,
if (sfp_type == ixgbe_sfp_type_da_act_lmt_core0 ||
sfp_type == ixgbe_sfp_type_1g_lx_core0 ||
sfp_type == ixgbe_sfp_type_1g_cu_core0 ||
@ -221,10 +221,10 @@ index 647fdba..0f39fd8 100644
sfp_type = ixgbe_sfp_type_srlr_core1;
/* Read offset to PHY init contents */
diff --git a/ixgbe_phy.h b/ixgbe_phy.h
index 3ece00f..60c7574 100644
--- a/ixgbe_phy.h
+++ b/ixgbe_phy.h
diff --git a/src/ixgbe_phy.h b/src/ixgbe_phy.h
index b6ddb2e..29c4645 100644
--- a/src/ixgbe_phy.h
+++ b/src/ixgbe_phy.h
@@ -18,6 +18,7 @@
#define IXGBE_SFF_1GBE_COMP_CODES 0x6
#define IXGBE_SFF_10GBE_COMP_CODES 0x3
@ -241,11 +241,11 @@ index 3ece00f..60c7574 100644
#define IXGBE_SFF_10GBASESR_CAPABLE 0x10
#define IXGBE_SFF_10GBASELR_CAPABLE 0x20
#define IXGBE_SFF_SOFT_RS_SELECT_MASK 0x8
diff --git a/ixgbe_type.h b/ixgbe_type.h
index d85bd9b..fbe2e66 100644
--- a/ixgbe_type.h
+++ b/ixgbe_type.h
@@ -3705,6 +3705,8 @@ enum ixgbe_sfp_type {
diff --git a/src/ixgbe_type.h b/src/ixgbe_type.h
index 1700599..403687c 100644
--- a/src/ixgbe_type.h
+++ b/src/ixgbe_type.h
@@ -3722,6 +3722,8 @@ enum ixgbe_sfp_type {
ixgbe_sfp_type_1g_sx_core1 = 12,
ixgbe_sfp_type_1g_lx_core0 = 13,
ixgbe_sfp_type_1g_lx_core1 = 14,
@ -255,5 +255,5 @@ index d85bd9b..fbe2e66 100644
ixgbe_sfp_type_unknown = 0xFFFF
};
--
2.44.0
2.39.5