From de05477c120bc9a845baad2c516ef4ed87f59ff1 Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Fri, 22 Mar 2024 07:50:58 +0000 Subject: ixgbe: T6155: always enable allow_unsupported_sfp for all NICs by default In-tree vs. Out-Of-Tree drivers differ in the way how unsupported transceivers are defined (uint vs array of int) for the Kernel module parameters. This results in: kernel: ixgbe 0000:5e:00.0: failed to initialize because an unsupported SFP+ module type was detected. kernel: ixgbe 0000:5e:00.0: Reload the driver after installing a supported module. kernel: ixgbe 0000:5e:00.0: removed PHC on eth6 This patch always enables unsupported SFP+ modules as wo do anyway from the userspace but only for the first port. (cherry picked from commit ea7d59a4bf64a854be04ccf7566e1cf95d4e09a8) --- packages/linux-kernel/build-intel-ixgbe.sh | 4 +++ .../patches/ixgbe/allow_unsupported_sfp.patch | 36 ++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 packages/linux-kernel/patches/ixgbe/allow_unsupported_sfp.patch (limited to 'packages') diff --git a/packages/linux-kernel/build-intel-ixgbe.sh b/packages/linux-kernel/build-intel-ixgbe.sh index 4f6d974b..36e403ad 100755 --- a/packages/linux-kernel/build-intel-ixgbe.sh +++ b/packages/linux-kernel/build-intel-ixgbe.sh @@ -57,6 +57,10 @@ echo "I: remove pci_enable_pcie_error_reporting() code no longer present in Kern sed -i '/.*pci_disable_pcie_error_reporting(pdev);/d' ixgbe_main.c sed -i '/.*pci_enable_pcie_error_reporting(pdev);/d' 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 + 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) install diff --git a/packages/linux-kernel/patches/ixgbe/allow_unsupported_sfp.patch b/packages/linux-kernel/patches/ixgbe/allow_unsupported_sfp.patch new file mode 100644 index 00000000..5e636320 --- /dev/null +++ b/packages/linux-kernel/patches/ixgbe/allow_unsupported_sfp.patch @@ -0,0 +1,36 @@ +From 7a95d34570377e46d5fdadb9b1c742db62e0256d Mon Sep 17 00:00:00 2001 +From: Christian Breunig +Date: Fri, 22 Mar 2024 08:37:54 +0100 +Subject: [PATCH] param: always enable allow_unsupported_sfp + +--- + ixgbe_param.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/ixgbe_param.c b/ixgbe_param.c +index 71197b7..30c21bd 100644 +--- a/ixgbe_param.c ++++ b/ixgbe_param.c +@@ -307,7 +307,7 @@ IXGBE_PARAM(LRO, "Large Receive Offload (0,1), default 0 = off"); + * Default Value: 0 + */ + IXGBE_PARAM(allow_unsupported_sfp, "Allow unsupported and untested " +- "SFP+ modules on 82599 based adapters, default 0 = Disable"); ++ "SFP+ modules on 82599 based adapters, default 1 = Enable"); + + /* Enable/disable support for DMA coalescing + * +@@ -1133,8 +1133,8 @@ void ixgbe_check_options(struct ixgbe_adapter *adapter) + struct ixgbe_option opt = { + .type = enable_option, + .name = "allow_unsupported_sfp", +- .err = "defaulting to Disabled", +- .def = OPTION_DISABLED ++ .err = "defaulting to Enabled", ++ .def = OPTION_ENABLED + }; + #ifdef module_param_array + if (num_allow_unsupported_sfp > bd) { +-- +2.39.2 + -- cgit v1.2.3 From 6ba7c507620e7616559727a5874c783f7a5fc627 Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Sat, 23 Mar 2024 09:18:59 +0100 Subject: ixgbe: T6155: always enable allow_unsupported_sfp even if module_param_array is undefined This extends an else path with the logic from commit ea7d59a4b ("ixgbe: T6155: always enable allow_unsupported_sfp for all NICs by default") (cherry picked from commit 70ac747b2889757e35ac2a90fd77cda9d4b97ebd) --- .../patches/ixgbe/allow_unsupported_sfp.patch | 24 ++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'packages') diff --git a/packages/linux-kernel/patches/ixgbe/allow_unsupported_sfp.patch b/packages/linux-kernel/patches/ixgbe/allow_unsupported_sfp.patch index 5e636320..647fe4d5 100644 --- a/packages/linux-kernel/patches/ixgbe/allow_unsupported_sfp.patch +++ b/packages/linux-kernel/patches/ixgbe/allow_unsupported_sfp.patch @@ -1,14 +1,14 @@ -From 7a95d34570377e46d5fdadb9b1c742db62e0256d Mon Sep 17 00:00:00 2001 +From 4f6c1dc3c48a1b2fa7c06206e6366bcfaa33f3f7 Mon Sep 17 00:00:00 2001 From: Christian Breunig -Date: Fri, 22 Mar 2024 08:37:54 +0100 -Subject: [PATCH] param: always enable allow_unsupported_sfp +Date: Fri, 22 Mar 2024 11:33:27 +0000 +Subject: [PATCH] ixgbe: always enable support for unsupported SFP+ modules --- - ixgbe_param.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) + ixgbe_param.c | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ixgbe_param.c b/ixgbe_param.c -index 71197b7..30c21bd 100644 +index 71197b7..dac33ca 100644 --- a/ixgbe_param.c +++ b/ixgbe_param.c @@ -307,7 +307,7 @@ IXGBE_PARAM(LRO, "Large Receive Offload (0,1), default 0 = off"); @@ -31,6 +31,18 @@ index 71197b7..30c21bd 100644 }; #ifdef module_param_array if (num_allow_unsupported_sfp > bd) { +@@ -1150,7 +1150,11 @@ void ixgbe_check_options(struct ixgbe_adapter *adapter) + } + #ifdef module_param_array + } else { ++ if (opt.def == OPTION_ENABLED) { ++ adapter->hw.allow_unsupported_sfp = true; ++ } else { + adapter->hw.allow_unsupported_sfp = false; ++ } + } + #endif + } -- 2.39.2 -- cgit v1.2.3