diff --git a/debian_iso_image.inc b/debian_iso_image.inc index b2dac5e8..a6f00c7d 100644 --- a/debian_iso_image.inc +++ b/debian_iso_image.inc @@ -5,47 +5,35 @@ #bnxt-en-rt #intel-i40e -#i40e -#i40e-rt -#i40e-cvl-2.54 -#i40e-cvl-2.54-rt -#i40e-cvl-4.10 -#i40e-cvl-4.10-rt +i40e +i40e-rt #intel-iavf -#iavf -#iavf-rt -#iavf-cvl-2.54 -#iavf-cvl-2.54-rt -#iavf-cvl-4.10 -#iavf-cvl-4.10-rt +iavf +iavf-rt #intel-ice -#ice -#ice-rt -#ice-cvl-2.54 -#ice-cvl-2.54-rt -#ice-cvl-4.10 -#ice-cvl-4.10-rt +ice +ice-rt # Marvell kernel modules #octeon-ep #octeon-ep-rt #intel-igb_uio -#igb-uio -#igb-uio-rt +igb-uio +igb-uio-rt #initramfs-trigger initramfs-trigger # Intel Quartzville Linux Driver -#iqvlinux -#iqvlinux-rt +iqvlinux +iqvlinux-rt #intel-opae-fpgaa -#kmod-opae-fpga-driver -#kmod-opae-fpga-driver-rt +kmod-opae-fpga-driver +kmod-opae-fpga-driver-rt # libbnxt_re - Broadcom Infiniband verbs library libbnxt-re diff --git a/debian_pkg_dirs b/debian_pkg_dirs index 9d7f7993..10a9538e 100644 --- a/debian_pkg_dirs +++ b/debian_pkg_dirs @@ -1,17 +1,11 @@ kernel-std #kernel-modules/bnxt_en -#kernel-modules/intel-i40e -#kernel-modules/intel-i40e-cvl-2.54 -#kernel-modules/intel-i40e-cvl-4.10 -#kernel-modules/intel-iavf -#kernel-modules/intel-iavf-cvl-2.54 -#kernel-modules/intel-iavf-cvl-4.10 +kernel-modules/intel-i40e +kernel-modules/intel-iavf kernel-modules/intel-ice -#kernel-modules/intel-ice-cvl-2.54 -#kernel-modules/intel-ice-cvl-4.10 -#kernel-modules/intel-igb_uio -#kernel-modules/intel-opae-fpga -#kernel-modules/intel-qv +kernel-modules/intel-igb_uio +kernel-modules/intel-opae-fpga +kernel-modules/intel-qv #kernel-modules/mlnx-ofa_kernel #kernel-modules/qat #kernel-modules/octeon_ep diff --git a/debian_pkg_dirs_rt b/debian_pkg_dirs_rt index a463e692..712fe1c7 100644 --- a/debian_pkg_dirs_rt +++ b/debian_pkg_dirs_rt @@ -1,17 +1,11 @@ kernel-rt #kernel-modules/bnxt_en -#kernel-modules/intel-i40e -#kernel-modules/intel-i40e-cvl-2.54 -#kernel-modules/intel-i40e-cvl-4.10 -#kernel-modules/intel-iavf -#kernel-modules/intel-iavf-cvl-2.54 -#kernel-modules/intel-iavf-cvl-4.10 +kernel-modules/intel-i40e +kernel-modules/intel-iavf kernel-modules/intel-ice -#kernel-modules/intel-ice-cvl-2.54 -#kernel-modules/intel-ice-cvl-4.10 -#kernel-modules/intel-igb_uio -#kernel-modules/intel-opae-fpga -#kernel-modules/intel-qv +kernel-modules/intel-igb_uio +kernel-modules/intel-opae-fpga +kernel-modules/intel-qv #kernel-modules/mlnx-ofa_kernel #kernel-modules/qat #kernel-modules/octeon_ep diff --git a/kernel-modules/intel-i40e/debian/deb_folder/patches/i40e-Enable-getting-link-status-from-VF.patch b/kernel-modules/intel-i40e/debian/deb_folder/patches/0001-i40e-Enable-getting-link-status-from-VF.patch similarity index 92% rename from kernel-modules/intel-i40e/debian/deb_folder/patches/i40e-Enable-getting-link-status-from-VF.patch rename to kernel-modules/intel-i40e/debian/deb_folder/patches/0001-i40e-Enable-getting-link-status-from-VF.patch index ed5dfd08..e054eafe 100644 --- a/kernel-modules/intel-i40e/debian/deb_folder/patches/i40e-Enable-getting-link-status-from-VF.patch +++ b/kernel-modules/intel-i40e/debian/deb_folder/patches/0001-i40e-Enable-getting-link-status-from-VF.patch @@ -1,7 +1,7 @@ -From de86a2f22230d3193ba08afe02b5bdfe75575089 Mon Sep 17 00:00:00 2001 +From 6d543d3fae602daabb3e768b8f8d813f89e29ce1 Mon Sep 17 00:00:00 2001 From: Vadim Suraev Date: Mon, 8 Feb 2016 15:57:30 -0500 -Subject: [PATCH] i40e: Enable getting link status from VF +Subject: [PATCH 01/10] i40e: Enable getting link status from VF Add handling of custom OP code sent from the PMD VF to get link status via the virtual channel interface. @@ -19,10 +19,10 @@ Signed-off-by: M. Vefa Bicakci 2 files changed, 79 insertions(+) diff --git a/src/i40e_virtchnl_pf.c b/src/i40e_virtchnl_pf.c -index 5ec2a78b937d..11190fb94c29 100644 +index 63a643b..4b0fee6 100644 --- a/src/i40e_virtchnl_pf.c +++ b/src/i40e_virtchnl_pf.c -@@ -3249,6 +3249,81 @@ err_out: +@@ -3237,6 +3237,81 @@ err_out: aq_ret); } @@ -104,7 +104,7 @@ index 5ec2a78b937d..11190fb94c29 100644 /** * i40e_vc_config_queues_msg * @vf: pointer to the VF info -@@ -5331,6 +5406,9 @@ int i40e_vc_process_vf_msg(struct i40e_pf *pf, s16 vf_id, u32 v_opcode, +@@ -5783,6 +5858,9 @@ int i40e_vc_process_vf_msg(struct i40e_pf *pf, s16 vf_id, u32 v_opcode, case VIRTCHNL_OP_REQUEST_QUEUES: ret = i40e_vc_request_queues_msg(vf, msg); break; @@ -115,10 +115,10 @@ index 5ec2a78b937d..11190fb94c29 100644 case VIRTCHNL_OP_ENABLE_CHANNELS: ret = i40e_vc_add_qch_msg(vf, msg); diff --git a/src/virtchnl.h b/src/virtchnl.h -index e72daf5130de..07f6d8a88db9 100644 +index 7754040..def666a 100644 --- a/src/virtchnl.h +++ b/src/virtchnl.h -@@ -150,6 +150,7 @@ enum virtchnl_ops { +@@ -174,6 +174,7 @@ enum virtchnl_ops { VIRTCHNL_OP_ENABLE_QUEUES_V2 = 107, VIRTCHNL_OP_DISABLE_QUEUES_V2 = 108, VIRTCHNL_OP_MAP_QUEUE_VECTOR = 111, @@ -127,5 +127,5 @@ index e72daf5130de..07f6d8a88db9 100644 }; -- -2.29.2 +2.42.0 diff --git a/kernel-modules/intel-i40e/debian/deb_folder/patches/i40e-add-more-debug-info-for-VFs-still-in-reset.patch b/kernel-modules/intel-i40e/debian/deb_folder/patches/0002-i40e-add-more-debug-info-for-VFs-still-in-reset.patch similarity index 80% rename from kernel-modules/intel-i40e/debian/deb_folder/patches/i40e-add-more-debug-info-for-VFs-still-in-reset.patch rename to kernel-modules/intel-i40e/debian/deb_folder/patches/0002-i40e-add-more-debug-info-for-VFs-still-in-reset.patch index 22b6d50a..ff99a61d 100644 --- a/kernel-modules/intel-i40e/debian/deb_folder/patches/i40e-add-more-debug-info-for-VFs-still-in-reset.patch +++ b/kernel-modules/intel-i40e/debian/deb_folder/patches/0002-i40e-add-more-debug-info-for-VFs-still-in-reset.patch @@ -1,7 +1,7 @@ -From a6a16444cbb50ce98c3cdf8ad5dff5e6ef1f66c1 Mon Sep 17 00:00:00 2001 +From 4500dcbf465c650c3247bfe0f444790b9e8c5501 Mon Sep 17 00:00:00 2001 From: Jim Somerville Date: Mon, 26 Mar 2018 11:03:47 -0400 -Subject: [PATCH] i40e add more debug info for VFs still in reset +Subject: [PATCH 02/10] i40e add more debug info for VFs still in reset Signed-off-by: Jim Somerville [mvb: Refresh patch for i40e v2.6.11] @@ -11,10 +11,10 @@ Signed-off-by: M. Vefa Bicakci 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/i40e_virtchnl_pf.c b/src/i40e_virtchnl_pf.c -index 11190fb94c29..2de803d3463e 100644 +index 4b0fee6..5f97dc9 100644 --- a/src/i40e_virtchnl_pf.c +++ b/src/i40e_virtchnl_pf.c -@@ -5525,8 +5525,8 @@ static int i40e_set_vf_mac(struct i40e_vf *vf, struct i40e_vsi *vsi, +@@ -6002,8 +6002,8 @@ static int i40e_set_vf_mac(struct i40e_vf *vf, struct i40e_vsi *vsi, msleep(20); } if (!test_bit(I40E_VF_STATE_INIT, &vf->vf_states)) { @@ -25,7 +25,7 @@ index 11190fb94c29..2de803d3463e 100644 ret = -EAGAIN; goto error_param; } -@@ -5663,8 +5663,8 @@ int i40e_ndo_set_vf_port_vlan(struct net_device *netdev, +@@ -6140,8 +6140,8 @@ int i40e_ndo_set_vf_port_vlan(struct net_device *netdev, vf = &pf->vf[vf_id]; vsi = pf->vsi[vf->lan_vsi_idx]; if (!test_bit(I40E_VF_STATE_INIT, &vf->vf_states)) { @@ -36,7 +36,7 @@ index 11190fb94c29..2de803d3463e 100644 ret = -EAGAIN; goto error_pvid; } -@@ -5856,8 +5856,8 @@ int i40e_ndo_set_vf_bw(struct net_device *netdev, int vf_id, int max_tx_rate) +@@ -6341,8 +6341,8 @@ int i40e_ndo_set_vf_bw(struct net_device *netdev, int vf_id, int max_tx_rate) vf = &pf->vf[vf_id]; vsi = pf->vsi[vf->lan_vsi_idx]; if (!test_bit(I40E_VF_STATE_INIT, &vf->vf_states)) { @@ -47,7 +47,7 @@ index 11190fb94c29..2de803d3463e 100644 ret = -EAGAIN; goto error; } -@@ -6062,8 +6062,8 @@ int i40e_ndo_set_vf_spoofchk(struct net_device *netdev, int vf_id, bool enable) +@@ -6547,8 +6547,8 @@ int i40e_ndo_set_vf_spoofchk(struct net_device *netdev, int vf_id, bool enable) vf = &(pf->vf[vf_id]); if (!test_bit(I40E_VF_STATE_INIT, &vf->vf_states)) { @@ -59,5 +59,5 @@ index 11190fb94c29..2de803d3463e 100644 goto out; } -- -2.29.2 +2.42.0 diff --git a/kernel-modules/intel-i40e/debian/deb_folder/patches/i40e_main-Use-irq_update_affinity_hint.patch b/kernel-modules/intel-i40e/debian/deb_folder/patches/0003-i40e_main-Use-irq_update_affinity_hint.patch similarity index 85% rename from kernel-modules/intel-i40e/debian/deb_folder/patches/i40e_main-Use-irq_update_affinity_hint.patch rename to kernel-modules/intel-i40e/debian/deb_folder/patches/0003-i40e_main-Use-irq_update_affinity_hint.patch index bba782c6..d62a1089 100644 --- a/kernel-modules/intel-i40e/debian/deb_folder/patches/i40e_main-Use-irq_update_affinity_hint.patch +++ b/kernel-modules/intel-i40e/debian/deb_folder/patches/0003-i40e_main-Use-irq_update_affinity_hint.patch @@ -1,7 +1,7 @@ -From 2ae84a0ff5b9d12aac1394965ff21d636fc3162b Mon Sep 17 00:00:00 2001 +From 209dceb1559491b4415645df53fa3949f1e3a6db Mon Sep 17 00:00:00 2001 From: "M. Vefa Bicakci" Date: Fri, 14 Jan 2022 17:25:25 -0500 -Subject: [PATCH] i40e_main: Use irq_update_affinity_hint +Subject: [PATCH 03/10] i40e_main: Use irq_update_affinity_hint This commit makes i40e_main use irq_update_affinity_hint instead of irq_set_affinity_hint to set the CPU affinity hints. This is done @@ -22,10 +22,10 @@ Signed-off-by: M. Vefa Bicakci 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/i40e_main.c b/src/i40e_main.c -index 874644bc0c1a..0bb06d3172b7 100644 +index 88050c6..1319cfa 100644 --- a/src/i40e_main.c +++ b/src/i40e_main.c -@@ -4761,10 +4761,10 @@ int i40e_vsi_request_irq_msix(struct i40e_vsi *vsi, char *basename) +@@ -5034,10 +5034,10 @@ int i40e_vsi_request_irq_msix(struct i40e_vsi *vsi, char *basename) * * get_cpu_mask returns a static constant mask with * a permanent lifetime so it's ok to pass to @@ -38,7 +38,7 @@ index 874644bc0c1a..0bb06d3172b7 100644 #endif /* HAVE_IRQ_AFFINITY_HINT */ } -@@ -4779,7 +4779,7 @@ free_queue_irqs: +@@ -5052,7 +5052,7 @@ free_queue_irqs: irq_set_affinity_notifier(irq_num, NULL); #endif #ifdef HAVE_IRQ_AFFINITY_HINT @@ -47,7 +47,7 @@ index 874644bc0c1a..0bb06d3172b7 100644 #endif free_irq(irq_num, &vsi->q_vectors[vector]); } -@@ -5594,7 +5594,7 @@ static void i40e_vsi_free_irq(struct i40e_vsi *vsi) +@@ -5868,7 +5868,7 @@ static void i40e_vsi_free_irq(struct i40e_vsi *vsi) #endif #ifdef HAVE_IRQ_AFFINITY_HINT /* remove our suggested affinity mask for this IRQ */ @@ -57,5 +57,5 @@ index 874644bc0c1a..0bb06d3172b7 100644 synchronize_irq(irq_num); free_irq(irq_num, vsi->q_vectors[i]); -- -2.29.2 +2.42.0 diff --git a/kernel-modules/intel-i40e/debian/deb_folder/patches/I40E-Add-the-condition-of-undef-NEED_ETH_HW_ADDR_SET.patch b/kernel-modules/intel-i40e/debian/deb_folder/patches/0004-I40E-Add-the-condition-of-undef-NEED_ETH_HW_ADDR_SET.patch similarity index 82% rename from kernel-modules/intel-i40e/debian/deb_folder/patches/I40E-Add-the-condition-of-undef-NEED_ETH_HW_ADDR_SET.patch rename to kernel-modules/intel-i40e/debian/deb_folder/patches/0004-I40E-Add-the-condition-of-undef-NEED_ETH_HW_ADDR_SET.patch index f1c579a7..c1875017 100644 --- a/kernel-modules/intel-i40e/debian/deb_folder/patches/I40E-Add-the-condition-of-undef-NEED_ETH_HW_ADDR_SET.patch +++ b/kernel-modules/intel-i40e/debian/deb_folder/patches/0004-I40E-Add-the-condition-of-undef-NEED_ETH_HW_ADDR_SET.patch @@ -1,7 +1,9 @@ -From 3e4fd1fe6ad31a76ae18597971404259961a4ea6 Mon Sep 17 00:00:00 2001 +From 6f42a57b9e4dd9bfacc88422247d774a17e78ff0 Mon Sep 17 00:00:00 2001 From: Peng Zhang Date: Thu, 21 Sep 2023 04:14:55 +0800 -Subject: [PATCH] I40E: Add the condition of 'undef NEED_ETH_HW_ADDR_SET' to +Subject: [PATCH 04/10] I40E: Add the condition of 'undef NEED_ETH_HW_ADDR_SET' + to + avoid redefinition conflict For function eth_hw_addr_set has already been defined in @@ -14,7 +16,7 @@ Signed-off-by: Peng Zhang 1 file changed, 3 insertions(+) diff --git a/src/kcompat_std_defs.h b/src/kcompat_std_defs.h -index 1d8d2c7..034c77a 100644 +index 1d8d2c7..b7534fb 100644 --- a/src/kcompat_std_defs.h +++ b/src/kcompat_std_defs.h @@ -252,6 +252,9 @@ @@ -28,5 +30,5 @@ index 1d8d2c7..034c77a 100644 #define HAVE_ETHTOOL_COALESCE_EXTACK #define HAVE_NDO_ETH_IOCTL -- -2.34.1 +2.42.0 diff --git a/kernel-modules/intel-i40e/debian/deb_folder/patches/0005-i40e-Accommodate-removal-of-u64_stats_fetch_-_irq.patch b/kernel-modules/intel-i40e/debian/deb_folder/patches/0005-i40e-Accommodate-removal-of-u64_stats_fetch_-_irq.patch new file mode 100644 index 00000000..0c72d76a --- /dev/null +++ b/kernel-modules/intel-i40e/debian/deb_folder/patches/0005-i40e-Accommodate-removal-of-u64_stats_fetch_-_irq.patch @@ -0,0 +1,57 @@ +From 68153951d8e0c330394caf7db1cd5c9d0bf730b6 Mon Sep 17 00:00:00 2001 +From: Jiping Ma +Date: Sun, 17 Mar 2024 19:56:45 -0700 +Subject: [PATCH 05/10] i40e: Accommodate removal of u64_stats_fetch_*_irq() + +This commit accommodates commit dec5efcffad4 ("u64_stat: Remove +the obsolete fetch_irq() variants.") merged in the v6.3 development +cycle, which causes the compilation errors listed below with the +new v6.6 kernel. + +Our changes are inspired from the ones in commit 068c38ad88cc ("net: +Remove the obsolte u64_stats_fetch_*_irq() users (drivers)."), which +removes the use of the API functions in question from the i40e +driver. We use C macros to alias the older API function names to the +currently available API function names. + +References: +* https://git.yoctoproject.org/linux-yocto/commit/?h=dec5efcffad4 +* https://git.yoctoproject.org/linux-yocto/commit/?h=068c38ad88cc + +Resolved compilation errors: + +src/i40e_main.c:493:11: error: implicit declaration of function \ + u64_stats_fetch_begin_irq; did you mean u64_stats_fetch_begin? \ + [-Werror=implicit-function-declaration] + 493 | start = u64_stats_fetch_begin_irq(&ring->syncp); + | ^~~~~~~~~~~~~~~~~~~~~~~~~ + | u64_stats_fetch_begin +src/i40e_main.c:496:11: error: implicit declaration of function \ + u64_stats_fetch_retry_irq; did you mean u64_stats_fetch_retry? \ + [-Werror=implicit-function-declaration] + 496 | } while (u64_stats_fetch_retry_irq(&ring->syncp, start)); + +Signed-off-by: Jiping Ma +--- + src/kcompat.h | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/src/kcompat.h b/src/kcompat.h +index 6a81d1c..c63901b 100644 +--- a/src/kcompat.h ++++ b/src/kcompat.h +@@ -5278,6 +5278,11 @@ static inline __u32 skb_get_hash_raw(const struct sk_buff *skb) + #endif /* 3.14.0 */ + + /*****************************************************************************/ ++#if ( LINUX_VERSION_CODE > KERNEL_VERSION(6,6,0) ) ++#define u64_stats_fetch_begin_irq u64_stats_fetch_begin ++#define u64_stats_fetch_retry_irq u64_stats_fetch_retry ++#endif ++ + #if ( LINUX_VERSION_CODE < KERNEL_VERSION(3,15,0) ) + #if ( LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35) ) + #define HAVE_SKBUFF_RXHASH +-- +2.42.0 + diff --git a/kernel-modules/intel-i40e/debian/deb_folder/patches/0006-i40e-drop-the-weight-argument-from-netif_napi_add.patch b/kernel-modules/intel-i40e/debian/deb_folder/patches/0006-i40e-drop-the-weight-argument-from-netif_napi_add.patch new file mode 100644 index 00000000..ed645b37 --- /dev/null +++ b/kernel-modules/intel-i40e/debian/deb_folder/patches/0006-i40e-drop-the-weight-argument-from-netif_napi_add.patch @@ -0,0 +1,49 @@ +From fc3d1b2f61a4cba66ba8f952ad332b83e9baf308 Mon Sep 17 00:00:00 2001 +From: Jiping Ma +Date: Sun, 17 Mar 2024 20:32:57 -0700 +Subject: [PATCH 06/10] i40e: drop the weight argument from netif_napi_add + +This patch accommodates commit b48b89f9c189 ("net: drop the weight argument +from netif_napi_add") merged in the v6.1 development cycle, by applying a +similar change to the out-of-tree i40e driver to resolve the compilation +errors encountered with the v6.6 kernel, which are listed below. + +References: +* https://git.yoctoproject.org/linux-yocto/commit/?h=b48b89f9c189 + +Resolved compilation errors: + +src/i40e_main.c:12759:3: error: too many arguments to function netif_napi_add +12759 | netif_napi_add(vsi->netdev, &q_vector->napi, + | ^~~~~~~~~~~~~~ +In file included from /usr/src/linux-headers-6.6.0-1-common/include/net/sock.h:46, + from /usr/src/linux-headers-6.6.0-1-common/include/linux/tcp.h:19, + from /usr/src/linux-headers-6.6.0-1-common/include/net/tcp.h:20, + from /<>/src/i40e.h:7, + from /<>/src/i40e_main.c:8: +/usr/src/linux-headers-6.6.0-1-common/include/linux/netdevice.h:2642:1: note: \ + declared here + 2642 | netif_napi_add(struct net_device *dev, struct napi_struct *napi, + +Signed-off-by: Jiping Ma +--- + src/i40e_main.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/src/i40e_main.c b/src/i40e_main.c +index 1319cfa..4c64e3e 100644 +--- a/src/i40e_main.c ++++ b/src/i40e_main.c +@@ -12756,8 +12756,7 @@ static int i40e_vsi_alloc_q_vector(struct i40e_vsi *vsi, int v_idx) + cpumask_copy(&q_vector->affinity_mask, cpu_possible_mask); + #endif + if (vsi->netdev) +- netif_napi_add(vsi->netdev, &q_vector->napi, +- i40e_napi_poll, NAPI_POLL_WEIGHT); ++ netif_napi_add(vsi->netdev, &q_vector->napi, i40e_napi_poll); + + /* tie q_vector and vsi together */ + vsi->q_vectors[v_idx] = q_vector; +-- +2.42.0 + diff --git a/kernel-modules/intel-i40e/debian/deb_folder/patches/0007-i40e-Remove-use-of-pci_enable_pcie_error_reporting.patch b/kernel-modules/intel-i40e/debian/deb_folder/patches/0007-i40e-Remove-use-of-pci_enable_pcie_error_reporting.patch new file mode 100644 index 00000000..30352a67 --- /dev/null +++ b/kernel-modules/intel-i40e/debian/deb_folder/patches/0007-i40e-Remove-use-of-pci_enable_pcie_error_reporting.patch @@ -0,0 +1,58 @@ +From ac442ea3a8642c9d0f557ac996b252a48c93248b Mon Sep 17 00:00:00 2001 +From: Jiping Ma +Date: Sun, 17 Mar 2024 20:36:25 -0700 +Subject: [PATCH 07/10] i40e: Remove use of pci_enable_pcie_error_reporting() + +This commit accommodates commit 7ec4b34be423 ("PCI/AER: Unexport +pci_enable_pcie_error_reporting()") merged in the v6.6 development cycle, +by applying changes similar to the ones found in commit d04d9e769993 +("i40e: Remove redundant pci_enable_pcie_error_reporting()") to resolve the +i40e driver compilation failures encountered with the v6.6 kernel, which are +listed below. + +References: +* https://git.yoctoproject.org/linux-yocto/commit/?h=d04d9e769993 + +Resolved compilation errors: + +src/i40e_main.c:17154:2: error: implicit declaration of function \ + pci_enable_pcie_error_reporting [-Werror=implicit-function-declaration] +17154 | pci_enable_pcie_error_reporting(pdev); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Signed-off-by: Jiping Ma +--- + src/i40e_main.c | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/src/i40e_main.c b/src/i40e_main.c +index 4c64e3e..7c86b01 100644 +--- a/src/i40e_main.c ++++ b/src/i40e_main.c +@@ -17150,7 +17150,6 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent) + goto err_pci_reg; + } + +- pci_enable_pcie_error_reporting(pdev); + pci_set_master(pdev); + + /* Now that we have a PCI connection, we need to do the +@@ -17768,7 +17767,6 @@ err_pf_reset: + err_ioremap: + kfree(pf); + err_pf_alloc: +- pci_disable_pcie_error_reporting(pdev); + pci_release_mem_regions(pdev); + err_pci_reg: + err_dma: +@@ -17934,7 +17932,6 @@ debug_mode_clear: + kfree(pf); + pci_release_mem_regions(pdev); + +- pci_disable_pcie_error_reporting(pdev); + pci_disable_device(pdev); + } + +-- +2.42.0 + diff --git a/kernel-modules/intel-i40e/debian/deb_folder/patches/0008-i40e-Include-xdp.h-where-required.patch b/kernel-modules/intel-i40e/debian/deb_folder/patches/0008-i40e-Include-xdp.h-where-required.patch new file mode 100644 index 00000000..9aaf6ce8 --- /dev/null +++ b/kernel-modules/intel-i40e/debian/deb_folder/patches/0008-i40e-Include-xdp.h-where-required.patch @@ -0,0 +1,43 @@ +From eacc41c1ca0c36218698058b3f8954549952efee Mon Sep 17 00:00:00 2001 +From: Jiping Ma +Date: Sun, 17 Mar 2024 22:44:57 -0700 +Subject: [PATCH 08/10] i40e: Include xdp.h where required + +This commit accommodates commit 680ee0456a57 ("net: invert the netdevice.h +vs xdp.h dependency") which removes the "#include " C preprocessor +directive from header file "netdevice.h". This commit was merged in the +v6.6 development cycle and causes compilation failures with the v6.6 kernel, +which are listed below. + +We accommodate this commit by including the "xdp.h" header file as needed +from "i40e_txrx.h". + +References: +* https://git.yoctoproject.org/linux-yocto/commit/?h=680ee0456a57 + +Resolved compilation errors: + +src/i40e_txrx.h:467:22: error: field xdp_rxq has incomplete type + 467 | struct xdp_rxq_info xdp_rxq; + +Signed-off-by: Jiping Ma +--- + src/i40e_txrx.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/i40e_txrx.h b/src/i40e_txrx.h +index f14c1ba..344de09 100644 +--- a/src/i40e_txrx.h ++++ b/src/i40e_txrx.h +@@ -4,6 +4,8 @@ + #ifndef _I40E_TXRX_H_ + #define _I40E_TXRX_H_ + ++#include ++ + /* Interrupt Throttling and Rate Limiting Goodies */ + #define I40E_DEFAULT_IRQ_WORK 256 + +-- +2.42.0 + diff --git a/kernel-modules/intel-i40e/debian/deb_folder/patches/0009-i40e-use-mul_u64_u64_div_u64-for-PTP-frequency-calcu.patch b/kernel-modules/intel-i40e/debian/deb_folder/patches/0009-i40e-use-mul_u64_u64_div_u64-for-PTP-frequency-calcu.patch new file mode 100644 index 00000000..3f744438 --- /dev/null +++ b/kernel-modules/intel-i40e/debian/deb_folder/patches/0009-i40e-use-mul_u64_u64_div_u64-for-PTP-frequency-calcu.patch @@ -0,0 +1,76 @@ +From d09b310a8d2a1726559fe6465433bb53f6d8606f Mon Sep 17 00:00:00 2001 +From: Jacob Keller +Date: Thu, 21 Jul 2022 14:29:58 -0700 +Subject: [PATCH 09/10] i40e: use mul_u64_u64_div_u64 for PTP frequency + calculation + +The i40e device has a different clock rate depending on the current link +speed. This requires using a different increment rate for the PTP clock +registers. For slower link speeds, the base increment value is larger. +Directly multiplying the larger increment value by the parts per billion +adjustment might overflow. + +To avoid this, the i40e implementation defaults to using the lower +increment value and then multiplying the adjustment afterwards. This causes +a loss of precision for lower link speeds. + +We can fix this by using mul_u64_u64_div_u64 instead of performing the +multiplications using standard C operations. On X86, this will use special +instructions that perform the multiplication and division with 128bit +intermediate values. For other architectures, the fallback implementation +will limit the loss of precision for large values. Small adjustments don't +overflow anyways and won't lose precision at all. + +This allows first multiplying the base increment value and then performing +the adjustment calculation, since we no longer fear overflowing. It also +makes it easier to convert to the even more precise .adjfine implementation +in a following change. + +Signed-off-by: Jacob Keller +Tested-by: Gurucharan (A Contingent worker at Intel) +Signed-off-by: Tony Nguyen +(cherry picked from commit 3626a690b717c18a969274e1fe000f8885d5afad) +[jma: This commit was cherry-picked from + https://git.yoctoproject.org/linux-yocto/commit/?h=3626a690b ] +Signed-off-by: Jiping Ma +--- + src/i40e_ptp.c | 17 ++++------------- + 1 file changed, 4 insertions(+), 13 deletions(-) + +diff --git a/src/i40e_ptp.c b/src/i40e_ptp.c +index a94b774..956b0eb 100644 +--- a/src/i40e_ptp.c ++++ b/src/i40e_ptp.c +@@ -368,25 +368,16 @@ static int i40e_ptp_adjfreq(struct ptp_clock_info *ptp, s32 ppb) + ppb = -ppb; + } + +- freq = I40E_PTP_40GB_INCVAL; +- freq *= ppb; +- diff = div_u64(freq, 1000000000ULL); ++ smp_mb(); /* Force any pending update before accessing. */ ++ freq = I40E_PTP_40GB_INCVAL * READ_ONCE(pf->ptp_adj_mult); ++ diff = mul_u64_u64_div_u64(freq, (u64)ppb, ++ 1000000000ULL); + + if (neg_adj) + adj = I40E_PTP_40GB_INCVAL - diff; + else + adj = I40E_PTP_40GB_INCVAL + diff; + +- /* At some link speeds, the base incval is so large that directly +- * multiplying by ppb would result in arithmetic overflow even when +- * using a u64. Avoid this by instead calculating the new incval +- * always in terms of the 40GbE clock rate and then multiplying by the +- * link speed factor afterwards. This does result in slightly lower +- * precision at lower link speeds, but it is fairly minor. +- */ +- smp_mb(); /* Force any pending update before accessing. */ +- adj *= READ_ONCE(pf->ptp_adj_mult); +- + wr32(hw, I40E_PRTTSYN_INC_L, (u32)adj); + wr32(hw, I40E_PRTTSYN_INC_H, (u32)(adj >> 32)); + +-- +2.42.0 + diff --git a/kernel-modules/intel-i40e/debian/deb_folder/patches/0010-i40e-convert-.adjfreq-to-.adjfine.patch b/kernel-modules/intel-i40e/debian/deb_folder/patches/0010-i40e-convert-.adjfreq-to-.adjfine.patch new file mode 100644 index 00000000..2d2261a4 --- /dev/null +++ b/kernel-modules/intel-i40e/debian/deb_folder/patches/0010-i40e-convert-.adjfreq-to-.adjfine.patch @@ -0,0 +1,86 @@ +From 262c2d5e13edac5b7da4518e72a7696f28331465 Mon Sep 17 00:00:00 2001 +From: Jacob Keller +Date: Thu, 21 Jul 2022 14:29:59 -0700 +Subject: [PATCH 10/10] i40e: convert .adjfreq to .adjfine + +The i40e driver currently implements the .adjfreq handler for frequency +adjustments. This takes the adjustment parameter in parts per billion. The +PTP core supports .adjfine which provides an adjustment in scaled parts per +million. This has a higher resolution and can result in more precise +adjustments for small corrections. + +Convert the existing .adjfreq implementation to the newer .adjfine +implementation. This is trivial since it just requires changing the divisor +from 1000000000ULL to (1000000ULL << 16) in the mul_u64_u64_div_u64 call. + +This improves the precision of the adjustments and gets us one driver +closer to removing the old .adjfreq support from the kernel. + +Signed-off-by: Jacob Keller +Tested-by: Gurucharan (A Contingent worker at Intel) +Signed-off-by: Tony Nguyen +(cherry picked from commit ccd3bf98592117f59be2daa0f2ca00f352d7abbc) +[jma: This commit was cherry-picked from + https://git.yoctoproject.org/linux-yocto/commit/?h=ccd3bf985 ] +Signed-off-by: Jiping Ma +--- + src/i40e_ptp.c | 22 ++++++++++++---------- + 1 file changed, 12 insertions(+), 10 deletions(-) + +diff --git a/src/i40e_ptp.c b/src/i40e_ptp.c +index 956b0eb..92af9f7 100644 +--- a/src/i40e_ptp.c ++++ b/src/i40e_ptp.c +@@ -349,29 +349,31 @@ static void i40e_ptp_convert_to_hwtstamp(struct skb_shared_hwtstamps *hwtstamps, + } + + /** +- * i40e_ptp_adjfreq - Adjust the PHC frequency ++ * i40e_ptp_adjfine - Adjust the PHC frequency + * @ptp: The PTP clock structure +- * @ppb: Parts per billion adjustment from the base ++ * @scaled_ppm: Scaled parts per million adjustment from base + * +- * Adjust the frequency of the PHC by the indicated parts per billion from the +- * base frequency. ++ * Adjust the frequency of the PHC by the indicated delta from the base ++ * frequency. ++ * ++ * Scaled parts per million is ppm with a 16 bit binary fractional field. + **/ +-static int i40e_ptp_adjfreq(struct ptp_clock_info *ptp, s32 ppb) ++static int i40e_ptp_adjfine(struct ptp_clock_info *ptp, long scaled_ppm) + { + struct i40e_pf *pf = container_of(ptp, struct i40e_pf, ptp_caps); + struct i40e_hw *hw = &pf->hw; + u64 adj, freq, diff; + int neg_adj = 0; + +- if (ppb < 0) { ++ if (scaled_ppm < 0) { + neg_adj = 1; +- ppb = -ppb; ++ scaled_ppm = -scaled_ppm; + } + + smp_mb(); /* Force any pending update before accessing. */ + freq = I40E_PTP_40GB_INCVAL * READ_ONCE(pf->ptp_adj_mult); +- diff = mul_u64_u64_div_u64(freq, (u64)ppb, +- 1000000000ULL); ++ diff = mul_u64_u64_div_u64(freq, (u64)scaled_ppm, ++ 1000000ULL << 16); + + if (neg_adj) + adj = I40E_PTP_40GB_INCVAL - diff; +@@ -1549,7 +1551,7 @@ static long i40e_ptp_create_clock(struct i40e_pf *pf) + sizeof(pf->ptp_caps.name) - 1); + pf->ptp_caps.owner = THIS_MODULE; + pf->ptp_caps.max_adj = 999999999; +- pf->ptp_caps.adjfreq = i40e_ptp_adjfreq; ++ pf->ptp_caps.adjfine = i40e_ptp_adjfine; + pf->ptp_caps.adjtime = i40e_ptp_adjtime; + #ifdef HAVE_PTP_CLOCK_INFO_GETTIME64 + pf->ptp_caps.gettime64 = i40e_ptp_gettime; +-- +2.42.0 + diff --git a/kernel-modules/intel-i40e/debian/deb_folder/patches/series b/kernel-modules/intel-i40e/debian/deb_folder/patches/series index 2d7a49d8..51466e97 100644 --- a/kernel-modules/intel-i40e/debian/deb_folder/patches/series +++ b/kernel-modules/intel-i40e/debian/deb_folder/patches/series @@ -1,4 +1,10 @@ -i40e-Enable-getting-link-status-from-VF.patch -i40e-add-more-debug-info-for-VFs-still-in-reset.patch -i40e_main-Use-irq_update_affinity_hint.patch -I40E-Add-the-condition-of-undef-NEED_ETH_HW_ADDR_SET.patch +0001-i40e-Enable-getting-link-status-from-VF.patch +0002-i40e-add-more-debug-info-for-VFs-still-in-reset.patch +0003-i40e_main-Use-irq_update_affinity_hint.patch +0004-I40E-Add-the-condition-of-undef-NEED_ETH_HW_ADDR_SET.patch +0005-i40e-Accommodate-removal-of-u64_stats_fetch_-_irq.patch +0006-i40e-drop-the-weight-argument-from-netif_napi_add.patch +0007-i40e-Remove-use-of-pci_enable_pcie_error_reporting.patch +0008-i40e-Include-xdp.h-where-required.patch +0009-i40e-use-mul_u64_u64_div_u64-for-PTP-frequency-calcu.patch +0010-i40e-convert-.adjfreq-to-.adjfine.patch diff --git a/kernel-modules/intel-i40e/debian/deb_folder/rules b/kernel-modules/intel-i40e/debian/deb_folder/rules index 7cd46e70..249baae4 100755 --- a/kernel-modules/intel-i40e/debian/deb_folder/rules +++ b/kernel-modules/intel-i40e/debian/deb_folder/rules @@ -49,7 +49,7 @@ pubkey ?= $(_keydir)/signing_key.x509 endif override_dh_auto_install: - dh_install src/$(kmod_name).ko /lib/modules/$(kversion)/updates/$(kmod_name)-$(bundle_version)/ + dh_install src/$(kmod_name).ko /lib/modules/$(kversion)/weak-updates/$(kmod_name)-$(bundle_version)/ dh_install -p$(pkg_common_name) pci.updates $(_defaultdocdir)/kmod-$(kmod_name)-$(version)/ dh_install -p$(pkg_common_name) README $(_defaultdocdir)/kmod-$(kmod_name)-$(version)/ dh_install -p$(pkg_common_name) $(kmod_name).7 $(_mandir)/man7/ @@ -61,7 +61,7 @@ override_dh_strip: ifeq ($(WITH_MOD_SIGN),1) @echo "Sign the modules!" /usr/lib/linux@KERNEL_TYPE@-kbuild-*/scripts/sign-file sha256 $(privkey) $(pubkey) \ - ./debian/$(pkg_name)/lib/modules/$(kversion)/updates/$(kmod_name)-$(bundle_version)/$(kmod_name).ko + ./debian/$(pkg_name)/lib/modules/$(kversion)/weak-updates/$(kmod_name)-$(bundle_version)/$(kmod_name).ko endif override_dh_auto_build: diff --git a/kernel-modules/intel-iavf/debian/deb_folder/patches/iavf_main-Use-irq_update_affinity_hint.patch b/kernel-modules/intel-iavf/debian/deb_folder/patches/0001-iavf_main-Use-irq_update_affinity_hint.patch similarity index 85% rename from kernel-modules/intel-iavf/debian/deb_folder/patches/iavf_main-Use-irq_update_affinity_hint.patch rename to kernel-modules/intel-iavf/debian/deb_folder/patches/0001-iavf_main-Use-irq_update_affinity_hint.patch index 1aeb65ad..2d34c6fa 100644 --- a/kernel-modules/intel-iavf/debian/deb_folder/patches/iavf_main-Use-irq_update_affinity_hint.patch +++ b/kernel-modules/intel-iavf/debian/deb_folder/patches/0001-iavf_main-Use-irq_update_affinity_hint.patch @@ -1,7 +1,7 @@ -From 1b24525e2971c01eafe7ac0f950dfb3a012035cf Mon Sep 17 00:00:00 2001 +From f6ac2de1f031994764d5bed39b79298929ef5b67 Mon Sep 17 00:00:00 2001 From: "M. Vefa Bicakci" Date: Fri, 14 Jan 2022 17:39:52 -0500 -Subject: [PATCH] iavf_main: Use irq_update_affinity_hint +Subject: [PATCH 1/8] iavf_main: Use irq_update_affinity_hint This commit makes iavf_main use irq_update_affinity_hint instead of irq_set_affinity_hint to set the CPU affinity hints. This is done @@ -22,10 +22,10 @@ Signed-off-by: M. Vefa Bicakci 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/iavf_main.c b/src/iavf_main.c -index 8af856576e34..65bf4e939ea3 100644 +index 69059ac..cc5ca85 100644 --- a/src/iavf_main.c +++ b/src/iavf_main.c -@@ -435,10 +435,10 @@ iavf_request_traffic_irqs(struct iavf_adapter *adapter, char *basename) +@@ -544,10 +544,10 @@ iavf_request_traffic_irqs(struct iavf_adapter *adapter, char *basename) #ifdef HAVE_IRQ_AFFINITY_HINT /* Spread the IRQ affinity hints across online CPUs. Note that * get_cpu_mask returns a mask with a permanent lifetime so @@ -38,7 +38,7 @@ index 8af856576e34..65bf4e939ea3 100644 #endif /* HAVE_IRQ_AFFINITY_HINT */ } -@@ -452,7 +452,7 @@ free_queue_irqs: +@@ -561,7 +561,7 @@ free_queue_irqs: irq_set_affinity_notifier(irq_num, NULL); #endif #ifdef HAVE_IRQ_AFFINITY_HINT @@ -47,7 +47,7 @@ index 8af856576e34..65bf4e939ea3 100644 #endif free_irq(irq_num, &adapter->q_vectors[vector]); } -@@ -508,7 +508,7 @@ static void iavf_free_traffic_irqs(struct iavf_adapter *adapter) +@@ -617,7 +617,7 @@ static void iavf_free_traffic_irqs(struct iavf_adapter *adapter) irq_set_affinity_notifier(irq_num, NULL); #endif #ifdef HAVE_IRQ_AFFINITY_HINT @@ -57,5 +57,5 @@ index 8af856576e34..65bf4e939ea3 100644 free_irq(irq_num, &adapter->q_vectors[vector]); } -- -2.29.2 +2.42.0 diff --git a/kernel-modules/intel-iavf/debian/deb_folder/patches/0001-intel-iavf-pass-linux-common-header-to-check_aux_bus.patch b/kernel-modules/intel-iavf/debian/deb_folder/patches/0002-intel-iavf-pass-linux-common-header-to-check_aux_bus.patch similarity index 91% rename from kernel-modules/intel-iavf/debian/deb_folder/patches/0001-intel-iavf-pass-linux-common-header-to-check_aux_bus.patch rename to kernel-modules/intel-iavf/debian/deb_folder/patches/0002-intel-iavf-pass-linux-common-header-to-check_aux_bus.patch index 3b30bcbc..c846604b 100644 --- a/kernel-modules/intel-iavf/debian/deb_folder/patches/0001-intel-iavf-pass-linux-common-header-to-check_aux_bus.patch +++ b/kernel-modules/intel-iavf/debian/deb_folder/patches/0002-intel-iavf-pass-linux-common-header-to-check_aux_bus.patch @@ -1,7 +1,7 @@ -From 9c8a4be36cf93039931c01970943420b787d37bc Mon Sep 17 00:00:00 2001 +From 5b4ad9d0df45bb9704b12927c793a65ccc7a42fa Mon Sep 17 00:00:00 2001 From: Li Zhou Date: Thu, 7 Apr 2022 11:42:47 +0800 -Subject: [PATCH] intel-iavf: pass linux common header to check_aux_bus +Subject: [PATCH 2/8] intel-iavf: pass linux common header to check_aux_bus For debian, there are two header pkgs, e.g. linux-headers-5.10.0-6-amd64 and linux-headers-5.10.0-6-common. linux-headers-5.10.0-6-amd64 is @@ -38,5 +38,5 @@ index 0b2ad05..a0b65d6 100644 # The out-of-tree auxiliary module we ship should be moved into this -- -2.30.2 +2.42.0 diff --git a/kernel-modules/intel-iavf/debian/deb_folder/patches/0001-Fix-the-invalid-check.patch b/kernel-modules/intel-iavf/debian/deb_folder/patches/0003-Fix-the-invalid-check-in-iavf_remove.patch similarity index 95% rename from kernel-modules/intel-iavf/debian/deb_folder/patches/0001-Fix-the-invalid-check.patch rename to kernel-modules/intel-iavf/debian/deb_folder/patches/0003-Fix-the-invalid-check-in-iavf_remove.patch index ba1fd521..6a829bd8 100644 --- a/kernel-modules/intel-iavf/debian/deb_folder/patches/0001-Fix-the-invalid-check.patch +++ b/kernel-modules/intel-iavf/debian/deb_folder/patches/0003-Fix-the-invalid-check-in-iavf_remove.patch @@ -1,7 +1,7 @@ -From 1c303402cf0fec469097fab8a4b898703c596831 Mon Sep 17 00:00:00 2001 +From cb27bf3ae02dde94988f643e71f59d94943c8798 Mon Sep 17 00:00:00 2001 From: Jiping Ma Date: Tue, 4 Apr 2023 23:40:48 -0700 -Subject: [PATCH] Fix the invalid check in iavf_remove() +Subject: [PATCH 3/8] Fix the invalid check in iavf_remove() If the netdev pointer is NULL, then iavf_remove() returns early to ensure that it does not proceed with an already-freed netdev instance. @@ -86,10 +86,10 @@ Signed-off-by: Jiping Ma 1 file changed, 3 insertions(+) diff --git a/src/iavf_main.c b/src/iavf_main.c -index 779e752..54d697c 100644 +index cc5ca85..8f8c459 100644 --- a/src/iavf_main.c +++ b/src/iavf_main.c -@@ -5727,6 +5727,9 @@ static void iavf_remove(struct pci_dev *pdev) +@@ -5757,6 +5757,9 @@ static void iavf_remove(struct pci_dev *pdev) struct iavf_mac_filter *f, *ftmp; struct iavf_hw *hw = &adapter->hw; @@ -100,5 +100,5 @@ index 779e752..54d697c 100644 set_bit(__IAVF_IN_REMOVE_TASK, &adapter->crit_section); cancel_work_sync(&adapter->adminq_task); -- -2.40.0 +2.42.0 diff --git a/kernel-modules/intel-iavf/debian/deb_folder/patches/0001-IAVF-Add-the-condition-of-undef-NEED_ETH_HW_ADDR_SET.patch b/kernel-modules/intel-iavf/debian/deb_folder/patches/0004-IAVF-Add-the-condition-of-undef-NEED_ETH_HW_ADDR_SET.patch similarity index 80% rename from kernel-modules/intel-iavf/debian/deb_folder/patches/0001-IAVF-Add-the-condition-of-undef-NEED_ETH_HW_ADDR_SET.patch rename to kernel-modules/intel-iavf/debian/deb_folder/patches/0004-IAVF-Add-the-condition-of-undef-NEED_ETH_HW_ADDR_SET.patch index 78b4790f..d38310ab 100644 --- a/kernel-modules/intel-iavf/debian/deb_folder/patches/0001-IAVF-Add-the-condition-of-undef-NEED_ETH_HW_ADDR_SET.patch +++ b/kernel-modules/intel-iavf/debian/deb_folder/patches/0004-IAVF-Add-the-condition-of-undef-NEED_ETH_HW_ADDR_SET.patch @@ -1,7 +1,9 @@ -From 3a104f93982a7e2ab08556303c6417f8b416d36d Mon Sep 17 00:00:00 2001 +From a1f51d984045f17414a746bfc05bbea2c8d3bcff Mon Sep 17 00:00:00 2001 From: Peng Zhang Date: Thu, 21 Sep 2023 05:43:31 +0800 -Subject: [PATCH] IAVF: Add the condition of 'undef NEED_ETH_HW_ADDR_SET' to +Subject: [PATCH 4/8] IAVF: Add the condition of 'undef NEED_ETH_HW_ADDR_SET' + to + avoid redefinition conflict For function eth_hw_addr_set has already been defined in @@ -10,11 +12,11 @@ linux-headers-5.10.0-6-common, add the condition of Signed-off-by: Peng Zhang --- - kcompat_std_defs.h | 3 +++ + src/kcompat_std_defs.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/kcompat_std_defs.h b/src/kcompat_std_defs.h -index a751779..6fb71dc 100644 +index a751779..3b9ed48 100644 --- a/src/kcompat_std_defs.h +++ b/src/kcompat_std_defs.h @@ -263,6 +263,9 @@ @@ -28,5 +30,5 @@ index a751779..6fb71dc 100644 #define HAVE_ETHTOOL_COALESCE_EXTACK #define HAVE_NDO_ETH_IOCTL -- -2.34.1 +2.42.0 diff --git a/kernel-modules/intel-iavf/debian/deb_folder/patches/0005-iavf-Remove-the-obsolte-u64_stats_fetch_-_irq-users-.patch b/kernel-modules/intel-iavf/debian/deb_folder/patches/0005-iavf-Remove-the-obsolte-u64_stats_fetch_-_irq-users-.patch new file mode 100644 index 00000000..d9fe64f8 --- /dev/null +++ b/kernel-modules/intel-iavf/debian/deb_folder/patches/0005-iavf-Remove-the-obsolte-u64_stats_fetch_-_irq-users-.patch @@ -0,0 +1,52 @@ +From 5bb575e7e2caf352e5ee9a476ed134746984fb15 Mon Sep 17 00:00:00 2001 +From: Jiping Ma +Date: Sun, 17 Mar 2024 23:30:36 -0700 +Subject: [PATCH 5/8] iavf: Remove the obsolte u64_stats_fetch_*_irq() users + (drivers). + +This commit accommodates commit dec5efcffad4 ("u64_stat: Remove +the obsolete fetch_irq() variants.") merged in the v6.3 development +cycle, which causes the compilation errors listed below with the +new v6.6 kernel. + +Our changes are inspired from the ones in commit 068c38ad88cc ("net: +Remove the obsolte u64_stats_fetch_*_irq() users (drivers)."), which +removes the use of the API functions in question from the iavf driver. +We use C macros to alias the older API function names to the currently +available API function names. + +References: +* https://git.yoctoproject.org/linux-yocto/commit/?h=dec5efcffad4 +* https://git.yoctoproject.org/linux-yocto/commit/?h=068c38ad88cc + +Resolved compilation errors: + +src/iavf_ethtool_stats.h:281:23: error: implicit declaration of\ + function u64_stats_fetch_begin_irq; did you mean u64_stats_fetch_begin?\ + [-Werror=implicit-function-declaration] + 281 | start = !ring ? 0 : u64_stats_fetch_begin_irq(&ring->syncp); + +Signed-off-by: Jiping Ma +--- + src/kcompat.h | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/src/kcompat.h b/src/kcompat.h +index c91951d..43b83f2 100644 +--- a/src/kcompat.h ++++ b/src/kcompat.h +@@ -5183,6 +5183,11 @@ static inline __u32 skb_get_hash_raw(const struct sk_buff *skb) + #endif /* 3.14.0 */ + + /*****************************************************************************/ ++#if ( LINUX_VERSION_CODE > KERNEL_VERSION(6,6,0) ) ++#define u64_stats_fetch_begin_irq u64_stats_fetch_begin ++#define u64_stats_fetch_retry_irq u64_stats_fetch_retry ++#endif ++ + #if ( LINUX_VERSION_CODE < KERNEL_VERSION(3,15,0) ) + #if ( LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35) ) + #define HAVE_SKBUFF_RXHASH +-- +2.42.0 + diff --git a/kernel-modules/intel-iavf/debian/deb_folder/patches/0006-iavf-include-xdp.h-where-required.patch b/kernel-modules/intel-iavf/debian/deb_folder/patches/0006-iavf-include-xdp.h-where-required.patch new file mode 100644 index 00000000..e2080d2d --- /dev/null +++ b/kernel-modules/intel-iavf/debian/deb_folder/patches/0006-iavf-include-xdp.h-where-required.patch @@ -0,0 +1,43 @@ +From 7a24bda57c62b6b7c90035fc8f0963d08ec8d8f4 Mon Sep 17 00:00:00 2001 +From: Jiping Ma +Date: Sun, 17 Mar 2024 23:32:42 -0700 +Subject: [PATCH 6/8] iavf: Include xdp.h where required + +This commit accommodates commit 680ee0456a57 ("net: invert the netdevice.h +vs xdp.h dependency") which removes the "#include " C preprocessor +directive from header file "netdevice.h". This commit was merged in the +v6.6 development cycle and causes compilation failures with the v6.6 kernel, +which are listed below. + +We accommodate this commit by including the "xdp.h" header file as needed +from "iavf_txrx.h". + +References: +* https://git.yoctoproject.org/linux-yocto/commit/?h=680ee0456a57 + +Resolved compilation errors: + +src/iavf_txrx.h:456:22: error: field xdp_rxq has incomplete type + 456 | struct xdp_rxq_info xdp_rxq; + +Signed-off-by: Jiping Ma +--- + src/iavf_txrx.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/iavf_txrx.h b/src/iavf_txrx.h +index a2a6a22..777b601 100644 +--- a/src/iavf_txrx.h ++++ b/src/iavf_txrx.h +@@ -4,6 +4,8 @@ + #ifndef _IAVF_TXRX_H_ + #define _IAVF_TXRX_H_ + ++#include ++ + /* Interrupt Throttling and Rate Limiting Goodies */ + #define IAVF_DEFAULT_IRQ_WORK 256 + +-- +2.42.0 + diff --git a/kernel-modules/intel-iavf/debian/deb_folder/patches/0007-iavf-drop-the-weight-argument-from-netif_napi_add.patch b/kernel-modules/intel-iavf/debian/deb_folder/patches/0007-iavf-drop-the-weight-argument-from-netif_napi_add.patch new file mode 100644 index 00000000..d0e10e70 --- /dev/null +++ b/kernel-modules/intel-iavf/debian/deb_folder/patches/0007-iavf-drop-the-weight-argument-from-netif_napi_add.patch @@ -0,0 +1,47 @@ +From 59af78038f9fcb61852e44701fb040f836359a5d Mon Sep 17 00:00:00 2001 +From: Jiping Ma +Date: Sun, 17 Mar 2024 23:34:59 -0700 +Subject: [PATCH 7/8] iavf: drop the weight argument from netif_napi_add + +This patch accommodates commit b48b89f9c189 ("net: drop the weight argument +from netif_napi_add") merged in the v6.1 development cycle, by applying a +similar change to the out-of-tree iavf driver to resolve the compilation +errors encountered with the v6.6 kernel, which are listed below. + +References: +* https://git.yoctoproject.org/linux-yocto/commit/?h=b48b89f9c189 + +Resolved compilation errors: + +src/iavf_main.c: In function iavf_alloc_q_vectors: +src/iavf_main.c:1730:3: error: too many arguments to function\ + netif_napi_add + 1730 | netif_napi_add(adapter->netdev, &q_vector->napi, + | ^~~~~~~~~~~~~~ +In file included from /<>/src/iavf.h:10, + from /<>/src/iavf_main.c:4: +/usr/src/linux-headers-6.1.0-1-common/include/linux/netdevice.h:2575:1: note: \ + declared here + 2575 | netif_napi_add(struct net_device *dev, struct napi_struct *napi, + +Signed-off-by: Jiping Ma +--- + src/iavf_main.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/iavf_main.c b/src/iavf_main.c +index 8f8c459..e0862ad 100644 +--- a/src/iavf_main.c ++++ b/src/iavf_main.c +@@ -1731,7 +1731,7 @@ static int iavf_alloc_q_vectors(struct iavf_adapter *adapter) + cpumask_copy(&q_vector->affinity_mask, cpu_possible_mask); + #endif + netif_napi_add(adapter->netdev, &q_vector->napi, +- iavf_napi_poll, NAPI_POLL_WEIGHT); ++ iavf_napi_poll); + } + + return 0; +-- +2.42.0 + diff --git a/kernel-modules/intel-iavf/debian/deb_folder/patches/0008-iavf-Remove-redundant-pci_enable_pcie_error_reportin.patch b/kernel-modules/intel-iavf/debian/deb_folder/patches/0008-iavf-Remove-redundant-pci_enable_pcie_error_reportin.patch new file mode 100644 index 00000000..2823a9ad --- /dev/null +++ b/kernel-modules/intel-iavf/debian/deb_folder/patches/0008-iavf-Remove-redundant-pci_enable_pcie_error_reportin.patch @@ -0,0 +1,51 @@ +From 6beb8717db54d692389272cffbb437c24db5bf6a Mon Sep 17 00:00:00 2001 +From: Jiping Ma +Date: Sun, 17 Mar 2024 23:37:16 -0700 +Subject: [PATCH 8/8] iavf: Remove redundant pci_enable_pcie_error_reporting() + +This commit accommodates commit 7ec4b34be423 ("PCI/AER: Unexport +pci_enable_pcie_error_reporting()") merged in the v6.6 development cycle, +by applying changes similar to the ones found in commit bc4fddc3b306 +("iavf: Remove redundant pci_enable_pcie_error_reporting()") to resolve the +iavf driver compilation failures encountered with the v6.6 kernel, which are +listed below. + +References: +* https://git.yoctoproject.org/linux-yocto/commit/?h=bc4fddc3b306 + +Resolved compilation errors: + +src/iavf_main.c:5859:2: error: implicit declaration of function \ + pci_disable_pcie_error_reporting [-Werror=implicit-function-declaration] + 5859 | pci_disable_pcie_error_reporting(pdev); + +Signed-off-by: Jiping Ma +--- + src/iavf_main.c | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/src/iavf_main.c b/src/iavf_main.c +index e0862ad..8f7c2b8 100644 +--- a/src/iavf_main.c ++++ b/src/iavf_main.c +@@ -5487,8 +5487,6 @@ static int iavf_probe(struct pci_dev *pdev, const struct pci_device_id *ent) + goto err_pci_reg; + } + +- pci_enable_pcie_error_reporting(pdev); +- + pci_set_master(pdev); + + netdev = alloc_etherdev_mq(sizeof(struct iavf_adapter), +@@ -5856,8 +5854,6 @@ static void iavf_remove(struct pci_dev *pdev) + + free_netdev(netdev); + +- pci_disable_pcie_error_reporting(pdev); +- + pci_disable_device(pdev); + } + +-- +2.42.0 + diff --git a/kernel-modules/intel-iavf/debian/deb_folder/patches/series b/kernel-modules/intel-iavf/debian/deb_folder/patches/series index ba7a8022..f68052e0 100644 --- a/kernel-modules/intel-iavf/debian/deb_folder/patches/series +++ b/kernel-modules/intel-iavf/debian/deb_folder/patches/series @@ -1,4 +1,8 @@ -iavf_main-Use-irq_update_affinity_hint.patch -0001-intel-iavf-pass-linux-common-header-to-check_aux_bus.patch -0001-Fix-the-invalid-check.patch -0001-IAVF-Add-the-condition-of-undef-NEED_ETH_HW_ADDR_SET.patch +0001-iavf_main-Use-irq_update_affinity_hint.patch +0002-intel-iavf-pass-linux-common-header-to-check_aux_bus.patch +0003-Fix-the-invalid-check-in-iavf_remove.patch +0004-IAVF-Add-the-condition-of-undef-NEED_ETH_HW_ADDR_SET.patch +0005-iavf-Remove-the-obsolte-u64_stats_fetch_-_irq-users-.patch +0006-iavf-include-xdp.h-where-required.patch +0007-iavf-drop-the-weight-argument-from-netif_napi_add.patch +0008-iavf-Remove-redundant-pci_enable_pcie_error_reportin.patch diff --git a/kernel-modules/intel-iavf/debian/deb_folder/rules b/kernel-modules/intel-iavf/debian/deb_folder/rules index aba5ceee..325280ff 100755 --- a/kernel-modules/intel-iavf/debian/deb_folder/rules +++ b/kernel-modules/intel-iavf/debian/deb_folder/rules @@ -51,7 +51,7 @@ pubkey ?= $(_keydir)/signing_key.x509 endif override_dh_auto_install: - dh_install src/$(kmod_name).ko /lib/modules/$(kversion)/updates/$(kmod_name)-$(bundle_version)/ + dh_install src/$(kmod_name).ko /lib/modules/$(kversion)/weak-updates/$(kmod_name)-$(bundle_version)/ dh_install -p$(pkg_common_name) pci.updates $(_defaultdocdir)/kmod-$(kmod_name)-$(version)/ dh_install -p$(pkg_common_name) README $(_defaultdocdir)/kmod-$(kmod_name)-$(version)/ dh_install -p$(pkg_common_name) $(kmod_name).7 $(_mandir)/man7/ @@ -63,7 +63,7 @@ override_dh_strip: ifeq ($(WITH_MOD_SIGN),1) @echo "Sign the modules!" /usr/lib/linux@KERNEL_TYPE@-kbuild-*/scripts/sign-file sha256 $(privkey) $(pubkey) \ - ./debian/$(pkg_name)/lib/modules/$(kversion)/updates/$(kmod_name)-$(bundle_version)/$(kmod_name).ko + ./debian/$(pkg_name)/lib/modules/$(kversion)/weak-updates/$(kmod_name)-$(bundle_version)/$(kmod_name).ko endif override_dh_auto_build: diff --git a/kernel-modules/intel-ice/debian/deb_folder/patches/0001-ice_main-ice_lib-Use-irq_update_affinity_hint.patch b/kernel-modules/intel-ice/debian/deb_folder/patches/0001-ice_main-ice_lib-Use-irq_update_affinity_hint.patch index 8c559ee2..bf1db99d 100644 --- a/kernel-modules/intel-ice/debian/deb_folder/patches/0001-ice_main-ice_lib-Use-irq_update_affinity_hint.patch +++ b/kernel-modules/intel-ice/debian/deb_folder/patches/0001-ice_main-ice_lib-Use-irq_update_affinity_hint.patch @@ -1,7 +1,7 @@ -From 722c51d207ea30388dfc63cec635e1d3e7d9d681 Mon Sep 17 00:00:00 2001 +From 089ab05c3aeff62f189e19a6960c2d9e80e33b62 Mon Sep 17 00:00:00 2001 From: "M. Vefa Bicakci" Date: Fri, 14 Jan 2022 17:50:39 -0500 -Subject: [PATCH] ice_main, ice_lib: Use irq_update_affinity_hint +Subject: [PATCH 01/16] ice_main, ice_lib: Use irq_update_affinity_hint This commit makes the ice device driver use the irq_update_affinity_hint function instead of the irq_set_affinity_hint function. This is done @@ -31,10 +31,10 @@ Signed-off-by: Jiping Ma 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ice_lib.c b/src/ice_lib.c -index 034a064..313273f 100644 +index e47d255..50a287c 100644 --- a/src/ice_lib.c +++ b/src/ice_lib.c -@@ -2900,7 +2900,7 @@ void ice_vsi_free_irq(struct ice_vsi *vsi) +@@ -3033,7 +3033,7 @@ void ice_vsi_free_irq(struct ice_vsi *vsi) irq_set_affinity_notifier(irq_num, NULL); /* clear the affinity_mask in the IRQ descriptor */ @@ -44,10 +44,10 @@ index 034a064..313273f 100644 devm_free_irq(ice_pf_to_dev(pf), irq_num, vsi->q_vectors[i]); } diff --git a/src/ice_main.c b/src/ice_main.c -index e00d7f8..ca761bd 100644 +index 6aaddd0..8f143ae 100644 --- a/src/ice_main.c +++ b/src/ice_main.c -@@ -3417,8 +3417,8 @@ static int ice_vsi_req_irq_msix(struct ice_vsi *vsi, char *basename) +@@ -3498,8 +3498,8 @@ static int ice_vsi_req_irq_msix(struct ice_vsi *vsi, char *basename) irq_set_affinity_notifier(irq_num, affinity_notify); } @@ -58,7 +58,7 @@ index e00d7f8..ca761bd 100644 } vsi->irqs_ready = true; -@@ -3430,7 +3430,7 @@ free_q_irqs: +@@ -3511,7 +3511,7 @@ free_q_irqs: irq_num = ice_get_irq_num(pf, base + vector); if (!IS_ENABLED(CONFIG_RFS_ACCEL)) irq_set_affinity_notifier(irq_num, NULL); @@ -68,5 +68,5 @@ index e00d7f8..ca761bd 100644 } return err; -- -2.31.1 +2.43.0 diff --git a/kernel-modules/intel-ice/debian/deb_folder/patches/0001-intel-ice-pass-linux-common-header-to-check_aux_bus.patch b/kernel-modules/intel-ice/debian/deb_folder/patches/0002-intel-ice-pass-linux-common-header-to-check_aux_bus.patch similarity index 91% rename from kernel-modules/intel-ice/debian/deb_folder/patches/0001-intel-ice-pass-linux-common-header-to-check_aux_bus.patch rename to kernel-modules/intel-ice/debian/deb_folder/patches/0002-intel-ice-pass-linux-common-header-to-check_aux_bus.patch index 24055bf1..eabbab5c 100644 --- a/kernel-modules/intel-ice/debian/deb_folder/patches/0001-intel-ice-pass-linux-common-header-to-check_aux_bus.patch +++ b/kernel-modules/intel-ice/debian/deb_folder/patches/0002-intel-ice-pass-linux-common-header-to-check_aux_bus.patch @@ -1,7 +1,7 @@ -From 06d6ff36d428a013913013237eb3257aa68cd668 Mon Sep 17 00:00:00 2001 +From 499da82984524d0840aae4f7847eaa01c733d35d Mon Sep 17 00:00:00 2001 From: Li Zhou Date: Thu, 7 Apr 2022 11:42:47 +0800 -Subject: [PATCH] intel-ice: pass linux common header to check_aux_bus +Subject: [PATCH 02/16] intel-ice: pass linux common header to check_aux_bus For debian, there are two header pkgs, e.g. linux-headers-5.10.0-6-amd64 and linux-headers-5.10.0-6-common. linux-headers-5.10.0-6-amd64 is @@ -38,5 +38,5 @@ index 960c15e..2ecff1b 100644 # The out-of-tree auxiliary module we ship should be moved into this -- -2.30.2 +2.43.0 diff --git a/kernel-modules/intel-ice/debian/deb_folder/patches/0001-rename-the-ddp-file-to-avoid-conflict.patch b/kernel-modules/intel-ice/debian/deb_folder/patches/0003-rename-the-ddp-file-to-avoid-conflict.patch similarity index 77% rename from kernel-modules/intel-ice/debian/deb_folder/patches/0001-rename-the-ddp-file-to-avoid-conflict.patch rename to kernel-modules/intel-ice/debian/deb_folder/patches/0003-rename-the-ddp-file-to-avoid-conflict.patch index 41c34ae2..8b2a14fd 100644 --- a/kernel-modules/intel-ice/debian/deb_folder/patches/0001-rename-the-ddp-file-to-avoid-conflict.patch +++ b/kernel-modules/intel-ice/debian/deb_folder/patches/0003-rename-the-ddp-file-to-avoid-conflict.patch @@ -1,8 +1,7 @@ -From f4d74cf58d2285d8b3ee6ab5cff7c21e54518d3d Mon Sep 17 00:00:00 2001 -Message-Id: +From 68f827860aa6e54a9ad0f7991635d582774414b1 Mon Sep 17 00:00:00 2001 From: Jackie Huang Date: Fri, 20 May 2022 03:23:25 -0400 -Subject: [PATCH] rename the ddp file to avoid conflict +Subject: [PATCH 03/16] rename the ddp file to avoid conflict Rename the ddp file to avoid conflict with the one provided by linux-firmware. @@ -14,7 +13,7 @@ Signed-off-by: Jim Somerville 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ice_main.c b/src/ice_main.c -index ca761bd..260cc03 100644 +index 8f143ae..fca6668 100644 --- a/src/ice_main.c +++ b/src/ice_main.c @@ -47,7 +47,7 @@ static const char ice_copyright[] = "Copyright (C) 2018-2021, Intel Corporation. @@ -27,5 +26,5 @@ index ca761bd..260cc03 100644 MODULE_AUTHOR("Intel Corporation, "); MODULE_DESCRIPTION(DRV_SUMMARY); -- -2.29.2 +2.43.0 diff --git a/kernel-modules/intel-ice/debian/deb_folder/patches/0001-Disable-irq_msix_misc-before-ptp-release.patch b/kernel-modules/intel-ice/debian/deb_folder/patches/0004-Disable-irq_msix_misc-before-ptp-release.patch similarity index 89% rename from kernel-modules/intel-ice/debian/deb_folder/patches/0001-Disable-irq_msix_misc-before-ptp-release.patch rename to kernel-modules/intel-ice/debian/deb_folder/patches/0004-Disable-irq_msix_misc-before-ptp-release.patch index 7bfc636f..847cbfc8 100644 --- a/kernel-modules/intel-ice/debian/deb_folder/patches/0001-Disable-irq_msix_misc-before-ptp-release.patch +++ b/kernel-modules/intel-ice/debian/deb_folder/patches/0004-Disable-irq_msix_misc-before-ptp-release.patch @@ -1,7 +1,7 @@ -From f89a25cb7c8e25aaf59567c81e9af993872a0e6c Mon Sep 17 00:00:00 2001 +From 969a9135af990c8ebc5da73fa0f4aaa3776c6d89 Mon Sep 17 00:00:00 2001 From: Jiping Ma Date: Mon, 10 Apr 2023 01:22:57 -0700 -Subject: [PATCH] Disable irq_msix_misc before ptp release +Subject: [PATCH 04/16] Disable irq_msix_misc before ptp release The ptp resources are released before disable irq_msix_misc interrupt in ice_remove() function when the system reboot, but @@ -54,10 +54,10 @@ Signed-off-by: Jiping Ma 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ice_main.c b/src/ice_main.c -index 9df9e85..b9ae8dc 100644 +index fca6668..40b01ae 100644 --- a/src/ice_main.c +++ b/src/ice_main.c -@@ -6589,6 +6589,7 @@ static void ice_remove(struct pci_dev *pdev) +@@ -6519,6 +6519,7 @@ static void ice_remove(struct pci_dev *pdev) #ifdef HAVE_NETDEV_UPPER_INFO ice_deinit_lag(pf); #endif /* HAVE_NETDEV_UPPER_INFO */ @@ -65,7 +65,7 @@ index 9df9e85..b9ae8dc 100644 if (test_bit(ICE_FLAG_PTP_SUPPORTED, pf->flags)) ice_ptp_release(pf); if (ice_is_feature_supported(pf, ICE_F_GNSS)) -@@ -6598,7 +6599,6 @@ static void ice_remove(struct pci_dev *pdev) +@@ -6528,7 +6529,6 @@ static void ice_remove(struct pci_dev *pdev) ice_setup_mc_magic_wake(pf); ice_vsi_release_all(pf); ice_set_wake(pf); @@ -74,5 +74,5 @@ index 9df9e85..b9ae8dc 100644 if (!pf->vsi[i]) continue; -- -2.40.0 +2.43.0 diff --git a/kernel-modules/intel-ice/debian/deb_folder/patches/0001-ICE-Add-the-condition-of-undef-NEED_ETH_HW_ADDR_SET-.patch b/kernel-modules/intel-ice/debian/deb_folder/patches/0005-ICE-Add-the-condition-of-undef-NEED_ETH_HW_ADDR_SET-.patch similarity index 82% rename from kernel-modules/intel-ice/debian/deb_folder/patches/0001-ICE-Add-the-condition-of-undef-NEED_ETH_HW_ADDR_SET-.patch rename to kernel-modules/intel-ice/debian/deb_folder/patches/0005-ICE-Add-the-condition-of-undef-NEED_ETH_HW_ADDR_SET-.patch index 74a44e2f..64a7e3fc 100644 --- a/kernel-modules/intel-ice/debian/deb_folder/patches/0001-ICE-Add-the-condition-of-undef-NEED_ETH_HW_ADDR_SET-.patch +++ b/kernel-modules/intel-ice/debian/deb_folder/patches/0005-ICE-Add-the-condition-of-undef-NEED_ETH_HW_ADDR_SET-.patch @@ -1,7 +1,9 @@ -From a740dac85681a93bb6c284869267e9a9b288fb79 Mon Sep 17 00:00:00 2001 +From 3ccc2feb4b362edeb4b6c992df18be1667e87975 Mon Sep 17 00:00:00 2001 From: Peng Zhang Date: Thu, 21 Sep 2023 06:11:00 +0800 -Subject: [PATCH] ICE: Add the condition of 'undef NEED_ETH_HW_ADDR_SET' to +Subject: [PATCH 05/16] ICE: Add the condition of 'undef NEED_ETH_HW_ADDR_SET' + to + avoid redefinition conflict For function eth_hw_addr_set has already been defined in @@ -14,7 +16,7 @@ Signed-off-by: Peng Zhang 1 file changed, 3 insertions(+) diff --git a/src/kcompat_std_defs.h b/src/kcompat_std_defs.h -index 59356b8..aeb7e9e 100644 +index 59356b8..a48fe09 100644 --- a/src/kcompat_std_defs.h +++ b/src/kcompat_std_defs.h @@ -255,6 +255,9 @@ @@ -28,5 +30,5 @@ index 59356b8..aeb7e9e 100644 #define HAVE_ETHTOOL_COALESCE_EXTACK #define HAVE_NDO_ETH_IOCTL -- -2.34.1 +2.43.0 diff --git a/kernel-modules/intel-ice/debian/deb_folder/patches/0006-ice-Accommodate-removal-of-u64_stats_fetch_-_irq.patch b/kernel-modules/intel-ice/debian/deb_folder/patches/0006-ice-Accommodate-removal-of-u64_stats_fetch_-_irq.patch new file mode 100644 index 00000000..c6cc4c12 --- /dev/null +++ b/kernel-modules/intel-ice/debian/deb_folder/patches/0006-ice-Accommodate-removal-of-u64_stats_fetch_-_irq.patch @@ -0,0 +1,58 @@ +From 8800ef77fd08fcc7f5d0491517bb7f566a4395b4 Mon Sep 17 00:00:00 2001 +From: Jiping Ma +Date: Mon, 18 Mar 2024 00:06:12 -0700 +Subject: [PATCH 06/16] ice: Accommodate removal of u64_stats_fetch_*_irq() + +This commit accommodates commit dec5efcffad4 ("u64_stat: Remove +the obsolete fetch_irq() variants.") merged in the v6.3 development +cycle, which causes the compilation errors listed below with the +new v6.6 kernel. + +Our changes are inspired from the ones in commit 068c38ad88cc ("net: +Remove the obsolte u64_stats_fetch_*_irq() users (drivers)."), which +removes the use of the API functions in question from the ice driver. +We use C macros to alias the older API function names to the currently +available API function names. + +References: +* https://git.yoctoproject.org/linux-yocto/commit/?h=dec5efcffad4 +* https://git.yoctoproject.org/linux-yocto/commit/?h=068c38ad88cc + +Resolved compilation errors: + +/src/ice_main.c:8266:11: error: implicit declaration of function \ + u64_stats_fetch_begin_irq; did you mean u64_stats_fetch_begin \ + [-Werror=implicit-function-declaration] + 8266 | start = u64_stats_fetch_begin_irq(&ring->syncp); + | ^~~~~~~~~~~~~~~~~~~~~~~~~ + | u64_stats_fetch_begin +/src/ice_main.c:8269:11: error: implicit declaration of function \ + u64_stats_fetch_retry_irq; did you mean u64_stats_fetch_retry \ + [-Werror=implicit-function-declaration] + 8269 | } while (u64_stats_fetch_retry_irq(&ring->syncp, start)); + | ^~~~~~~~~~~~~~~~~~~~~~~~~ + | u64_stats_fetch_retry + +Signed-off-by: Jiping Ma +--- + src/kcompat.h | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/kcompat.h b/src/kcompat.h +index 469094f..239054b 100644 +--- a/src/kcompat.h ++++ b/src/kcompat.h +@@ -1480,6 +1480,10 @@ char *_kc_devm_kstrdup(struct device *dev, const char *s, gfp_t gfp); + #define HAVE_NET_GET_RANDOM_ONCE + #define HAVE_PTP_1588_CLOCK_PINS + #define HAVE_NETDEV_PORT ++#if ( LINUX_VERSION_CODE > KERNEL_VERSION(6,6,0) ) ++#define u64_stats_fetch_begin_irq u64_stats_fetch_begin ++#define u64_stats_fetch_retry_irq u64_stats_fetch_retry ++#endif + #endif /* 3.15.0 */ + + /*****************************************************************************/ +-- +2.43.0 + diff --git a/kernel-modules/intel-ice/debian/deb_folder/patches/0007-ice-drop-the-weight-argument-from-netif_napi_add.patch b/kernel-modules/intel-ice/debian/deb_folder/patches/0007-ice-drop-the-weight-argument-from-netif_napi_add.patch new file mode 100644 index 00000000..4bee55a2 --- /dev/null +++ b/kernel-modules/intel-ice/debian/deb_folder/patches/0007-ice-drop-the-weight-argument-from-netif_napi_add.patch @@ -0,0 +1,78 @@ +From 386677b4a6a41a50741b290d30cf0cc257183609 Mon Sep 17 00:00:00 2001 +From: Jiping Ma +Date: Mon, 18 Mar 2024 00:12:48 -0700 +Subject: [PATCH 07/16] ice: drop the weight argument from netif_napi_add + +This patch accommodates commit b48b89f9c189 ("net: drop the weight argument +from netif_napi_add") merged in the v6.1 development cycle, by applying a +similar change to the out-of-tree ice driver to resolve the compilation +errors encountered with the v6.6 kernel, which are listed below. + +References: +* https://git.yoctoproject.org/linux-yocto/commit/?h=b48b89f9c189 + +Resolved compilation errors: + +/src/ice_main.c:4375:3: error: too many arguments to function netif_napi_add + 4375 | netif_napi_add(vsi->netdev, &vsi->q_vectors[v_idx]->napi, + | ^~~~~~~~~~~~~~ +In file included from /usr/src/linux-headers-6.1.0-1-common/include/linux/\ + etherdevice.h:21, + from /<>/src/kcompat.h:16, + from /<>/src/ice.h:7, + from /<>/src/ice_main.c:8: +/usr/src/linux-headers-6.1.0-1-common/include/linux/netdevice.h:2575:1: \ + note: declared here + 2575 | netif_napi_add(struct net_device *dev, struct napi_struct *napi, + +Signed-off-by: Jiping Ma +--- + src/ice_base.c | 3 +-- + src/ice_eswitch.c | 3 +-- + src/ice_main.c | 2 +- + 3 files changed, 3 insertions(+), 5 deletions(-) + +diff --git a/src/ice_base.c b/src/ice_base.c +index b43752e..d9c9d42 100644 +--- a/src/ice_base.c ++++ b/src/ice_base.c +@@ -127,8 +127,7 @@ static int ice_vsi_alloc_q_vector(struct ice_vsi *vsi, u16 v_idx) + * handler here (i.e. resume, reset/rebuild, etc.) + */ + if (vsi->netdev) +- netif_napi_add(vsi->netdev, &q_vector->napi, ice_napi_poll, +- NAPI_POLL_WEIGHT); ++ netif_napi_add(vsi->netdev, &q_vector->napi, ice_napi_poll); + + out: + /* tie q_vector and VSI together */ +diff --git a/src/ice_eswitch.c b/src/ice_eswitch.c +index 6e44820..3c8f65b 100644 +--- a/src/ice_eswitch.c ++++ b/src/ice_eswitch.c +@@ -330,8 +330,7 @@ static int ice_eswitch_setup_reprs(struct ice_pf *pf) + if (max_vsi_num < vsi->vsi_num) + max_vsi_num = vsi->vsi_num; + +- netif_napi_add(vf->repr->netdev, &vf->repr->q_vector->napi, ice_napi_poll, +- NAPI_POLL_WEIGHT); ++ netif_napi_add(vf->repr->netdev, &vf->repr->q_vector->napi, ice_napi_poll); + + netif_keep_dst(vf->repr->netdev); + } +diff --git a/src/ice_main.c b/src/ice_main.c +index 40b01ae..96ac8c3 100644 +--- a/src/ice_main.c ++++ b/src/ice_main.c +@@ -4373,7 +4373,7 @@ static void ice_napi_add(struct ice_vsi *vsi) + + ice_for_each_q_vector(vsi, v_idx) + netif_napi_add(vsi->netdev, &vsi->q_vectors[v_idx]->napi, +- ice_napi_poll, NAPI_POLL_WEIGHT); ++ ice_napi_poll); + } + + /** +-- +2.43.0 + diff --git a/kernel-modules/intel-ice/debian/deb_folder/patches/0008-ice-Remove-redundant-pci_enable_pcie_error_reporting.patch b/kernel-modules/intel-ice/debian/deb_folder/patches/0008-ice-Remove-redundant-pci_enable_pcie_error_reporting.patch new file mode 100644 index 00000000..55d3f44e --- /dev/null +++ b/kernel-modules/intel-ice/debian/deb_folder/patches/0008-ice-Remove-redundant-pci_enable_pcie_error_reporting.patch @@ -0,0 +1,66 @@ +From 83e6106cac698c253c54fc6410b7005b13d64565 Mon Sep 17 00:00:00 2001 +From: Jiping Ma +Date: Mon, 18 Mar 2024 00:15:20 -0700 +Subject: [PATCH 08/16] ice: Remove redundant pci_enable_pcie_error_reporting() + +This commit accommodates commit 7ec4b34be423 ("PCI/AER: Unexport +pci_enable_pcie_error_reporting()") merged in the v6.6 development cycle, +by applying changes similar to the ones found in commit ba153552c18d +("ice: Remove redundant pci_enable_pcie_error_reporting()") to resolve the +ice driver compilation failures encountered with the v6.6 kernel, which are +listed below. + +References: +* https://git.yoctoproject.org/linux-yocto/commit/?h=7ec4b34be423 +* https://git.yoctoproject.org/linux-yocto/commit/?h=ba153552c18d + +Resolved compilation errors: + +/src/ice_main.c:6013:2: error: implicit declaration of function \ + pci_enable_pcie_error_reporting [-Werror=implicit-function-declaration] + 6013 | pci_enable_pcie_error_reporting(pdev); + +Signed-off-by: Jiping Ma +--- + src/ice_main.c | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/src/ice_main.c b/src/ice_main.c +index 96ac8c3..24a77fd 100644 +--- a/src/ice_main.c ++++ b/src/ice_main.c +@@ -1101,7 +1101,6 @@ static void ice_remove_recovery_mode(struct ice_pf *pf) + } + + ice_reset(&pf->hw, ICE_RESET_PFR); +- pci_disable_pcie_error_reporting(pf->pdev); + #ifndef HAVE_DEVLINK_NOTIFY_REGISTER + ice_devlink_unregister(pf); + #endif /* !HAVE_DEVLINK_NOTIFY_REGISTER */ +@@ -6010,7 +6009,6 @@ ice_probe(struct pci_dev *pdev, const struct pci_device_id __always_unused *ent) + return err; + } + +- pci_enable_pcie_error_reporting(pdev); + pci_set_master(pdev); + + pf->pdev = pdev; +@@ -6377,7 +6375,6 @@ err_rec_mode: + #ifndef HAVE_DEVLINK_NOTIFY_REGISTER + ice_devlink_unregister(pf); + #endif /* !HAVE_DEVLINK_NOTIFY_REGISTER */ +- pci_disable_pcie_error_reporting(pdev); + pci_disable_device(pdev); + return err; + } +@@ -6554,7 +6551,6 @@ static void ice_remove(struct pci_dev *pdev) + ice_reset(hw, ICE_RESET_PFR); + pci_wait_for_pending_transaction(pdev); + ice_clear_interrupt_scheme(pf); +- pci_disable_pcie_error_reporting(pdev); + pci_disable_device(pdev); + } + +-- +2.43.0 + diff --git a/kernel-modules/intel-ice/debian/deb_folder/patches/0009-ice-Include-xdp.h-where-required.patch b/kernel-modules/intel-ice/debian/deb_folder/patches/0009-ice-Include-xdp.h-where-required.patch new file mode 100644 index 00000000..44283209 --- /dev/null +++ b/kernel-modules/intel-ice/debian/deb_folder/patches/0009-ice-Include-xdp.h-where-required.patch @@ -0,0 +1,42 @@ +From 944ae5bff0c0b6124c23e7493a130e98ec7bc12e Mon Sep 17 00:00:00 2001 +From: Jiping Ma +Date: Mon, 18 Mar 2024 00:17:03 -0700 +Subject: [PATCH 09/16] ice: Include xdp.h where required + +This commit accommodates commit 680ee0456a57 ("net: invert the netdevice.h +vs xdp.h dependency") which removes the "#include " C preprocessor +directive from header file "netdevice.h". This commit was merged in the +v6.6 development cycle and causes compilation failures with the v6.6 kernel, +which are listed below. + +We accommodate this commit by including the "xdp.h" header file as needed +from "ice_txrx.h". + +References: +* https://git.yoctoproject.org/linux-yocto/commit/?h=680ee0456a57 + +Resolved compilation errors: + +/src/ice_txrx.h:399:22: error: field xdp_rxq has incomplete type + 399 | struct xdp_rxq_info xdp_rxq; + +Signed-off-by: Jiping Ma +--- + src/ice_txrx.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/ice_txrx.h b/src/ice_txrx.h +index 4daa554..d00c754 100644 +--- a/src/ice_txrx.h ++++ b/src/ice_txrx.h +@@ -5,6 +5,7 @@ + #define _ICE_TXRX_H_ + + #include "ice_type.h" ++#include + + #define ICE_DFLT_IRQ_WORK 256 + #define ICE_RXBUF_3072 3072 +-- +2.43.0 + diff --git a/kernel-modules/intel-ice/debian/deb_folder/patches/0010-ice-add-extack-support-in-fdb-del-handlers.patch b/kernel-modules/intel-ice/debian/deb_folder/patches/0010-ice-add-extack-support-in-fdb-del-handlers.patch new file mode 100644 index 00000000..a5fb843f --- /dev/null +++ b/kernel-modules/intel-ice/debian/deb_folder/patches/0010-ice-add-extack-support-in-fdb-del-handlers.patch @@ -0,0 +1,48 @@ +From c4f81132dfaf28fb215db27ba476cc6f15ac6124 Mon Sep 17 00:00:00 2001 +From: Jiping Ma +Date: Mon, 18 Mar 2024 07:56:01 +0000 +Subject: [PATCH 10/16] ice: add extack support in fdb del handlers + +Accommodate the changes made in commit ca4567f1e6f6 ("rtnetlink: add extack +support in fdb del handlers"), which was merged in the v5.19 development +cycle, and which introduces an additional argument to the .ndo_fdb_del +callback function in the net_device_ops structure. This causes build +errors to be encountered, which are listed below. + +References: +* https://git.yoctoproject.org/linux-yocto/commit/?id=ca4567f1e6f6 + +Resolved compilation errors: + +src/ice_main.c:11936:17: error: initialization of int (*)(struct ndmsg *,\ + struct nlattr **, struct net_device *, const unsigned char *, u16, \ + struct netlink_ext_ack *) int (*)(struct ndmsg *, struct nlattr **, \ + struct net_device *, const unsigned char *, short unsigned int, \ + struct netlink_ext_ack *) from incompatible pointer type int (*)\ + (struct ndmsg *, struct nlattr **, struct net_device *, const \ + unsigned char *, u16) int (*)(struct ndmsg *, struct nlattr **,\ + struct net_device *, const unsigned char *, short unsigned int)\ + [-Werror=incompatible-pointer-types] +11936 | .ndo_fdb_del = ice_fdb_del, + +Signed-off-by: Jiping Ma +--- + src/ice_main.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/ice_main.c b/src/ice_main.c +index 24a77fd..3cbbe17 100644 +--- a/src/ice_main.c ++++ b/src/ice_main.c +@@ -7302,7 +7302,7 @@ ice_fdb_add(struct ndmsg *ndm, struct nlattr __always_unused *tb[], + static int + ice_fdb_del(struct ndmsg *ndm, __always_unused struct nlattr *tb[], + struct net_device *dev, const unsigned char *addr, +- __always_unused u16 vid) ++ __always_unused u16 vid, struct netlink_ext_ack *extack) + #else + static int + ice_fdb_del(struct ndmsg *ndm, __always_unused struct nlattr *tb[], +-- +2.43.0 + diff --git a/kernel-modules/intel-ice/debian/deb_folder/patches/0011-ice-Use-SET_NETDEV_DEVLINK_PORT-to-set-devlink_port.patch b/kernel-modules/intel-ice/debian/deb_folder/patches/0011-ice-Use-SET_NETDEV_DEVLINK_PORT-to-set-devlink_port.patch new file mode 100644 index 00000000..26716957 --- /dev/null +++ b/kernel-modules/intel-ice/debian/deb_folder/patches/0011-ice-Use-SET_NETDEV_DEVLINK_PORT-to-set-devlink_port.patch @@ -0,0 +1,129 @@ +From bd7dcb9835078e542b13bd8858533e5fef431602 Mon Sep 17 00:00:00 2001 +From: Jiping Ma +Date: Thu, 29 Feb 2024 09:25:30 +0000 +Subject: [PATCH 11/16] ice: Use SET_NETDEV_DEVLINK_PORT to set devlink_port + +This commit applies a subset of the changes in commit ac73d4bf2cda +("net: make drivers to use SET_NETDEV_DEVLINK_PORT to set devlink_port"), +merged in the v6.2 development cycle, to resolve compilation errors +encountered with the v6.6 kernel when building the out-of-tree ice driver. + +In addition, we also swap the order of register_netdev and +SET_NETDEV_DEVLINK_PORT in ice_register_netdev() to fix the following +kernel warning: + +WARNING: CPU: 0 PID: 966 at ice-1.9.11/src/ice_main.c:5740 \ + ice_probe+0x155b/0x16b0 [ice]" + +References: +* https://git.yoctoproject.org/linux-yocto/commit/?h=ac73d4bf2cda + +Signed-off-by: Jiping Ma +--- + src/ice_devlink.c | 14 ++------------ + src/ice_main.c | 20 ++++++++++---------- + src/ice_repr.c | 9 ++++----- + 3 files changed, 16 insertions(+), 27 deletions(-) + +diff --git a/src/ice_devlink.c b/src/ice_devlink.c +index 41b7046..4878626 100644 +--- a/src/ice_devlink.c ++++ b/src/ice_devlink.c +@@ -1191,12 +1191,7 @@ int ice_devlink_create_pf_port(struct ice_pf *pf) + */ + void ice_devlink_destroy_pf_port(struct ice_pf *pf) + { +- struct devlink_port *devlink_port; +- +- devlink_port = &pf->devlink_port; +- +- devlink_port_type_clear(devlink_port); +- devlink_port_unregister(devlink_port); ++ devlink_port_unregister(&pf->devlink_port); + } + + #ifdef HAVE_DEVLINK_PORT_ATTR_PCI_VF +@@ -1254,12 +1249,7 @@ int ice_devlink_create_vf_port(struct ice_vf *vf) + */ + void ice_devlink_destroy_vf_port(struct ice_vf *vf) + { +- struct devlink_port *devlink_port; +- +- devlink_port = &vf->devlink_port; +- +- devlink_port_type_clear(devlink_port); +- devlink_port_unregister(devlink_port); ++ devlink_port_unregister(&vf->devlink_port); + } + #endif /* HAVE_DEVLINK_PORT_ATTR_PCI_VF */ + +diff --git a/src/ice_main.c b/src/ice_main.c +index 3cbbe17..728eab2 100644 +--- a/src/ice_main.c ++++ b/src/ice_main.c +@@ -5740,6 +5740,13 @@ static int ice_register_netdev(struct ice_pf *pf) + if (!vsi || !vsi->netdev) + return -EIO; + ++#if IS_ENABLED(CONFIG_NET_DEVLINK) ++ err = ice_devlink_create_pf_port(pf); ++ if (err) ++ goto err_devlink_create; ++ ++ SET_NETDEV_DEVLINK_PORT(vsi->netdev, &pf->devlink_port); ++#endif /* CONFIG_NET_DEVLINK */ + err = register_netdev(vsi->netdev); + if (err) + goto err_register_netdev; +@@ -5747,21 +5754,14 @@ static int ice_register_netdev(struct ice_pf *pf) + set_bit(ICE_VSI_NETDEV_REGISTERED, vsi->state); + netif_carrier_off(vsi->netdev); + netif_tx_stop_all_queues(vsi->netdev); +-#if IS_ENABLED(CONFIG_NET_DEVLINK) +- err = ice_devlink_create_pf_port(pf); +- if (err) +- goto err_devlink_create; +- +- devlink_port_type_eth_set(&pf->devlink_port, vsi->netdev); +-#endif /* CONFIG_NET_DEVLINK */ + + return 0; ++ ++err_register_netdev: + #if IS_ENABLED(CONFIG_NET_DEVLINK) ++ ice_devlink_destroy_pf_port(pf); + err_devlink_create: +- unregister_netdev(vsi->netdev); +- clear_bit(ICE_VSI_NETDEV_REGISTERED, vsi->state); + #endif /* CONFIG_NET_DEVLINK */ +-err_register_netdev: + free_netdev(vsi->netdev); + vsi->netdev = NULL; + clear_bit(ICE_VSI_NETDEV_ALLOCD, vsi->state); +diff --git a/src/ice_repr.c b/src/ice_repr.c +index bc00dad..26e254e 100644 +--- a/src/ice_repr.c ++++ b/src/ice_repr.c +@@ -437,15 +437,14 @@ static int ice_repr_add(struct ice_vf *vf) + #endif /* CONFIG_NET_DEVLINK */ + + SET_NETDEV_DEV(repr->netdev, ice_pf_to_dev(vf->pf)); +- err = ice_repr_reg_netdev(repr->netdev); +- if (err) +- goto err_netdev; +- + #if IS_ENABLED(CONFIG_NET_DEVLINK) + #ifdef HAVE_DEVLINK_PORT_ATTR_PCI_VF +- devlink_port_type_eth_set(&vf->devlink_port, repr->netdev); ++ SET_NETDEV_DEVLINK_PORT(repr->netdev, &vf->devlink_port); + #endif /* HAVE_DEVLINK_PORT_ATTR_PCI_VF */ + #endif /* CONFIG_NET_DEVLINK */ ++ err = ice_repr_reg_netdev(repr->netdev); ++ if (err) ++ goto err_netdev; + + ice_virtchnl_set_repr_ops(vf); + +-- +2.43.0 + diff --git a/kernel-modules/intel-ice/debian/deb_folder/patches/0012-ice-remove-unused-ndo_get_devlink_port.patch b/kernel-modules/intel-ice/debian/deb_folder/patches/0012-ice-remove-unused-ndo_get_devlink_port.patch new file mode 100644 index 00000000..ac248a8f --- /dev/null +++ b/kernel-modules/intel-ice/debian/deb_folder/patches/0012-ice-remove-unused-ndo_get_devlink_port.patch @@ -0,0 +1,90 @@ +From a648b9ab1f5b7fb04765977d724cc8fc12356d66 Mon Sep 17 00:00:00 2001 +From: Jiri Pirko +Date: Wed, 2 Nov 2022 17:02:10 +0100 +Subject: [PATCH 12/16] ice: remove unused ndo_get_devlink_port + +Remove ndo_get_devlink_port which is no longer used alongside with the +implementations in drivers. + +Signed-off-by: Jiri Pirko +Signed-off-by: Jakub Kicinski +(cherry picked from commit 77df1db80da384c565106321f5934967690da7dd) +[jma: This commit was cherry-picked from + https://git.yoctoproject.org/linux-yocto/commit/?h=77df1db80d] +Signed-off-by: Jiping Ma +--- + src/ice_main.c | 21 --------------------- + src/ice_repr.c | 12 ------------ + 2 files changed, 33 deletions(-) + +diff --git a/src/ice_main.c b/src/ice_main.c +index 728eab2..5d7a814 100644 +--- a/src/ice_main.c ++++ b/src/ice_main.c +@@ -608,24 +608,6 @@ static int ice_clear_promisc(struct ice_vsi *vsi, u8 promisc_m) + return 0; + } + +-#if IS_ENABLED(CONFIG_NET_DEVLINK) +-#ifdef HAVE_NDO_GET_DEVLINK_PORT +-/** +- * ice_get_devlink_port - Get devlink port from netdev +- * @netdev: the netdevice structure +- */ +-static struct devlink_port *ice_get_devlink_port(struct net_device *netdev) +-{ +- struct ice_pf *pf = ice_netdev_to_pf(netdev); +- +- if (!ice_is_switchdev_running(pf)) +- return NULL; +- +- return &pf->devlink_port; +-} +-#endif /* HAVE_NDO_GET_DEVLINK_PORT */ +-#endif /* CONFIG_NET_DEVLINK */ +- + /** + * ice_vsi_sync_fltr - Update the VSI filter list to the HW + * @vsi: ptr to the VSI +@@ -12008,8 +11990,5 @@ static const struct net_device_ops ice_netdev_ops = { + #endif /* HAVE_RHEL7_NET_DEVICE_OPS_EXT */ + #endif /* HAVE_NDO_DFWD_OPS */ + #if IS_ENABLED(CONFIG_NET_DEVLINK) +-#ifdef HAVE_NDO_GET_DEVLINK_PORT +- .ndo_get_devlink_port = ice_get_devlink_port, +-#endif /* HAVE_NDO_GET_DEVLINK_PORT */ + #endif /* CONFIG_NET_DEVLINK */ + }; +diff --git a/src/ice_repr.c b/src/ice_repr.c +index 26e254e..655ae46 100644 +--- a/src/ice_repr.c ++++ b/src/ice_repr.c +@@ -153,15 +153,6 @@ static int ice_repr_stop(struct net_device *netdev) + return 0; + } + +-#if IS_ENABLED(CONFIG_NET_DEVLINK) && defined(HAVE_DEVLINK_PORT_ATTR_PCI_VF) +-static struct devlink_port * +-ice_repr_get_devlink_port(struct net_device *netdev) +-{ +- struct ice_repr *repr = ice_netdev_to_repr(netdev); +- +- return &repr->vf->devlink_port; +-} +-#endif /* CONFIG_NET_DEVLINK && HAVE_DEVLINK_PORT_ATTR_PCI_VF*/ + #if defined(HAVE_NDO_OFFLOAD_STATS) || defined(HAVE_RHEL7_EXTENDED_OFFLOAD_STATS) + /** + * ice_repr_sp_stats64 - get slow path stats for port representor +@@ -322,9 +313,6 @@ static const struct net_device_ops ice_repr_netdev_ops = { + #else + .ndo_change_mtu = ice_repr_change_mtu, + #endif /* HAVE_RHEL7_EXTENDED_MIN_MAX_MTU */ +-#ifdef HAVE_DEVLINK_PORT_ATTR_PCI_VF +- .ndo_get_devlink_port = ice_repr_get_devlink_port, +-#endif /* HAVE_DEVLINK_PORT_ATTR_PCI_VF */ + #ifdef HAVE_TC_SETUP_CLSFLOWER + #ifdef HAVE_RHEL7_NETDEV_OPS_EXT_NDO_SETUP_TC + .extended.ndo_setup_tc_rh = ice_repr_setup_tc, +-- +2.43.0 + diff --git a/kernel-modules/intel-ice/debian/deb_folder/patches/0013-ice-remove-unused-netdev_unregistering.patch b/kernel-modules/intel-ice/debian/deb_folder/patches/0013-ice-remove-unused-netdev_unregistering.patch new file mode 100644 index 00000000..5870a4aa --- /dev/null +++ b/kernel-modules/intel-ice/debian/deb_folder/patches/0013-ice-remove-unused-netdev_unregistering.patch @@ -0,0 +1,41 @@ +From 924bff95512505a13b19a2d2865d2fe4df2444e1 Mon Sep 17 00:00:00 2001 +From: Jiping Ma +Date: Mon, 18 Mar 2024 08:19:25 +0000 +Subject: [PATCH 13/16] ice: remove unused netdev_unregistering() + +Accommodate the changes made in commit f3fb589aeb88 ("net: remove +unused netdev_unregistering()"), which was merged in the v6.4 +development cycle, and which removed the function +netdev_unregistering(). This causes build errors to be encountered, +which are listed below. + +References: +* https://git.yoctoproject.org/linux-yocto/commit/?id=f3fb589aeb88 + +Resolved compilation errors: + +src/ice_lag.c:280:7: error: implicit declaration of function netdev_unregistering;\ + did you mean devl_unregister [-Werror=implicit-function-declaration] + 280 | netdev_unregistering(lag_work->lag->upper_netdev)) + +Signed-off-by: Jiping Ma +--- + src/ice_lag.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/ice_lag.c b/src/ice_lag.c +index 3722763..717e625 100644 +--- a/src/ice_lag.c ++++ b/src/ice_lag.c +@@ -277,7 +277,7 @@ static void ice_lag_process_event(struct work_struct *work) + case NETDEV_UNREGISTER: + netdev = lag_work->info.bonding_info.info.dev; + if (netdev == lag_work->lag->netdev && lag_work->lag->bonded && +- netdev_unregistering(lag_work->lag->upper_netdev)) ++ lag_work->lag->upper_netdev->reg_state == NETREG_UNREGISTERING) + ice_lag_unlink(lag_work->lag); + break; + default: +-- +2.43.0 + diff --git a/kernel-modules/intel-ice/debian/deb_folder/patches/0014-ice-Modify-ice_gnss_tty_write-to-be-compatible-with-.patch b/kernel-modules/intel-ice/debian/deb_folder/patches/0014-ice-Modify-ice_gnss_tty_write-to-be-compatible-with-.patch new file mode 100644 index 00000000..40bca1bf --- /dev/null +++ b/kernel-modules/intel-ice/debian/deb_folder/patches/0014-ice-Modify-ice_gnss_tty_write-to-be-compatible-with-.patch @@ -0,0 +1,45 @@ +From f075637a03a7ca7143a8b3247237d6526b389dbf Mon Sep 17 00:00:00 2001 +From: Jiping Ma +Date: Mon, 18 Mar 2024 08:24:37 +0000 +Subject: [PATCH 14/16] ice: Modify ice_gnss_tty_write() to be compatible with + 6.6.7 kernel + +This commit accommodates commit 95713967ba52 ("tty: make +tty_operations::write()'s count size_t"), which was merged in the v6.6 +development cycle, and which use size_t for counts and ssize_t for +retval. This causes build errors to be encountered, which are listed below. + +References: +* https://git.yoctoproject.org/linux-yocto/commit/?id=95713967ba52 + +Resolved compilation errors: + +src/ice_gnss.c:430:11: error: initialization of ssize_t (*)(struct tty_struct *,\ + const u8 *, size_t) {aka long int (*)(struct tty_struct *, const unsigned char *,\ + long unsigne pointer type int (*)(struct tty_struct *, const unsigned char *, int)\ + [-Werror=incompatible-pointer-types] + 430 | .write = ice_gnss_tty_write, + +Signed-off-by: Jiping Ma +--- + src/ice_gnss.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/ice_gnss.c b/src/ice_gnss.c +index aa2c55b..161faa2 100644 +--- a/src/ice_gnss.c ++++ b/src/ice_gnss.c +@@ -328,8 +328,8 @@ exit: + * If any errors happen during the write call, a negative error value should be + * returned instead of the number of characters that were written. + */ +-static int +-ice_gnss_tty_write(struct tty_struct *tty, const unsigned char *buf, int count) ++static ssize_t ++ice_gnss_tty_write(struct tty_struct *tty, const u8 *buf, size_t count) + { + struct gnss_write_buf *write_buf; + struct gnss_serial *gnss; +-- +2.43.0 + diff --git a/kernel-modules/intel-ice/debian/deb_folder/patches/0015-devlink-let-the-core-report-the-driver-name-instead-.patch b/kernel-modules/intel-ice/debian/deb_folder/patches/0015-devlink-let-the-core-report-the-driver-name-instead-.patch new file mode 100644 index 00000000..99b8f6b4 --- /dev/null +++ b/kernel-modules/intel-ice/debian/deb_folder/patches/0015-devlink-let-the-core-report-the-driver-name-instead-.patch @@ -0,0 +1,51 @@ +From 604857fd1f50aeaa756386eaa51b54172652ab6e Mon Sep 17 00:00:00 2001 +From: Vincent Mailhol +Date: Tue, 29 Nov 2022 18:51:38 +0900 +Subject: [PATCH 15/16] devlink: let the core report the driver name instead of + the drivers + +The driver name is available in device_driver::name. Right now, +drivers still have to report this piece of information themselves in +their devlink_ops::info_get callback function. + +In order to factorize code, make devlink_nl_info_fill() add the driver +name attribute. + +Now that the core sets the driver name attribute, drivers are not +supposed to call devlink_info_driver_name_put() anymore. Remove +devlink_info_driver_name_put() and clean-up all the drivers using this +function in their callback. + +Signed-off-by: Vincent Mailhol +Tested-by: Ido Schimmel # mlxsw +Reviewed-by: Jacob Keller +Reviewed-by: Jiri Pirko +Signed-off-by: Jakub Kicinski +(cherry picked from commit 226bf980550627c88549b112ac6c8fb40873afb4) +[jma: This commit was cherry-picked from + https://git.yoctoproject.org/linux-yocto/commit/?h=226bf980] +Signed-off-by: Jiping Ma +--- + src/ice_devlink.c | 6 ------ + 1 file changed, 6 deletions(-) + +diff --git a/src/ice_devlink.c b/src/ice_devlink.c +index 4878626..b166187 100644 +--- a/src/ice_devlink.c ++++ b/src/ice_devlink.c +@@ -357,12 +357,6 @@ static int ice_devlink_info_get(struct devlink *devlink, + } + } + +- err = devlink_info_driver_name_put(req, KBUILD_MODNAME); +- if (err) { +- NL_SET_ERR_MSG_MOD(extack, "Unable to set driver name"); +- goto out_free_ctx; +- } +- + ice_info_get_dsn(pf, ctx); + + err = devlink_info_serial_number_put(req, ctx->buf); +-- +2.43.0 + diff --git a/kernel-modules/intel-ice/debian/deb_folder/patches/0016-devlink-remove-devlink-features.patch b/kernel-modules/intel-ice/debian/deb_folder/patches/0016-devlink-remove-devlink-features.patch new file mode 100644 index 00000000..e14bbf24 --- /dev/null +++ b/kernel-modules/intel-ice/debian/deb_folder/patches/0016-devlink-remove-devlink-features.patch @@ -0,0 +1,53 @@ +From ef4c0b2682415cd257c04c813d2eab8028eb1746 Mon Sep 17 00:00:00 2001 +From: Jiping Ma +Date: Fri, 1 Mar 2024 02:03:33 +0000 +Subject: [PATCH 16/16] devlink: remove devlink features + +This commit accommodates commit fb8421a94c56 ("devlink: remove +devlink features"), which removes devlink_set_features() function. +This commit was merged in the v6.4 development cycle and causes +compilation failures with the v6.6 kernel, which are listed below. + +We accommodate this commit by undefine HAVE_DEVLINK_SET_FEATURES +for the v6.6 kernel. It is also align with the function of +ice_devlink_register() in the ice driver of the upstream code. + +References: +* https://git.yoctoproject.org/linux-yocto/commit/?h=fb8421a94c56 + +Devlink features were introduced to disallow devlink reload calls of +userspace before the devlink was fully initialized. The reason for this +workaround was the fact that devlink reload was originally called +without devlink instance lock held. + +However, with recent changes that converted devlink reload to be +performed under devlink instance lock, this is redundant so remove +devlink features entirely. + +src/ice_devlink.c:1034:2: error: implicit declaration of function \ +devlink_set_features; did you mean netif_skb_features? \ +[-Werror=implicit-function-declaration] + 1034 | devlink_set_features(devlink, DEVLINK_F_RELOAD); + +Signed-off-by: Jiping Ma +--- + src/kcompat_std_defs.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/kcompat_std_defs.h b/src/kcompat_std_defs.h +index a48fe09..9b523ec 100644 +--- a/src/kcompat_std_defs.h ++++ b/src/kcompat_std_defs.h +@@ -268,7 +268,9 @@ + #if (LINUX_VERSION_CODE < KERNEL_VERSION(5,16,0)) + #else /* >= 5.16.0 */ + #undef HAVE_PASID_SUPPORT ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(6,6,0)) + #define HAVE_DEVLINK_SET_FEATURES ++#endif + #define HAVE_DEVLINK_NOTIFY_REGISTER + #undef HAVE_DEVLINK_RELOAD_ENABLE_DISABLE + #undef HAVE_DEVLINK_PARAMS_PUBLISH +-- +2.43.0 + diff --git a/kernel-modules/intel-ice/debian/deb_folder/patches/series b/kernel-modules/intel-ice/debian/deb_folder/patches/series index fe60ba89..3ddef047 100644 --- a/kernel-modules/intel-ice/debian/deb_folder/patches/series +++ b/kernel-modules/intel-ice/debian/deb_folder/patches/series @@ -1,5 +1,16 @@ 0001-ice_main-ice_lib-Use-irq_update_affinity_hint.patch -0001-intel-ice-pass-linux-common-header-to-check_aux_bus.patch -0001-rename-the-ddp-file-to-avoid-conflict.patch -0001-Disable-irq_msix_misc-before-ptp-release.patch -0001-ICE-Add-the-condition-of-undef-NEED_ETH_HW_ADDR_SET-.patch +0002-intel-ice-pass-linux-common-header-to-check_aux_bus.patch +0003-rename-the-ddp-file-to-avoid-conflict.patch +0004-Disable-irq_msix_misc-before-ptp-release.patch +0005-ICE-Add-the-condition-of-undef-NEED_ETH_HW_ADDR_SET-.patch +0006-ice-Accommodate-removal-of-u64_stats_fetch_-_irq.patch +0007-ice-drop-the-weight-argument-from-netif_napi_add.patch +0008-ice-Remove-redundant-pci_enable_pcie_error_reporting.patch +0009-ice-Include-xdp.h-where-required.patch +0010-ice-add-extack-support-in-fdb-del-handlers.patch +0011-ice-Use-SET_NETDEV_DEVLINK_PORT-to-set-devlink_port.patch +0012-ice-remove-unused-ndo_get_devlink_port.patch +0013-ice-remove-unused-netdev_unregistering.patch +0014-ice-Modify-ice_gnss_tty_write-to-be-compatible-with-.patch +0015-devlink-let-the-core-report-the-driver-name-instead-.patch +0016-devlink-remove-devlink-features.patch diff --git a/kernel-modules/intel-ice/debian/deb_folder/rules b/kernel-modules/intel-ice/debian/deb_folder/rules index 87561f03..33e3a876 100755 --- a/kernel-modules/intel-ice/debian/deb_folder/rules +++ b/kernel-modules/intel-ice/debian/deb_folder/rules @@ -48,11 +48,11 @@ pubkey ?= $(_keydir)/signing_key.x509 endif override_dh_auto_install: -# dh_install src/$(kmod_name).ko /lib/modules/$(kversion)/updates/$(kmod_name)-$(bundle_version)/ -# dh_install -p$(pkg_common_name) pci.updates $(_defaultdocdir)/kmod-$(kmod_name)-$(version)/ -# dh_install -p$(pkg_common_name) README $(_defaultdocdir)/kmod-$(kmod_name)-$(version)/ -# dh_install -p$(pkg_common_name) $(kmod_name).7 $(_mandir)/man7/ -# dh_install -p$(pkg_common_name) debian/extra/ice.conf $(_sysconfdir)/modules-load.d/ + dh_install src/$(kmod_name).ko /lib/modules/$(kversion)/weak-updates/$(kmod_name)-$(bundle_version)/ + dh_install -p$(pkg_common_name) pci.updates $(_defaultdocdir)/kmod-$(kmod_name)-$(version)/ + dh_install -p$(pkg_common_name) README $(_defaultdocdir)/kmod-$(kmod_name)-$(version)/ + dh_install -p$(pkg_common_name) $(kmod_name).7 $(_mandir)/man7/ + dh_install -p$(pkg_common_name) debian/extra/ice.conf $(_sysconfdir)/modules-load.d/ # Install both the OS default regular DDP fw and the COMMS version dh_installdirs -p$(pkg_common_name) /lib/firmware/updates/intel/ice/ddp/ install -m 644 ddp/README debian/$(pkg_common_name)/lib/firmware/updates/intel/ice/ddp/ @@ -62,18 +62,18 @@ override_dh_auto_install: install -m644 ice_comms/ice_comms*.pkg debian/$(pkg_common_name)/lib/firmware/updates/intel/ice/ddp/ # Make the regular DDP fw be the default one to load dh_installdirs -p$(pkg_common_name) /lib/firmware/intel/ice/ddp/ - ln -frs debian/$(pkg_common_name)/lib/firmware/updates/intel/ice/ddp/ice-*.pkg debian/$(pkg_common_name)/lib/firmware/intel/ice/ddp/ice.pkg + ln -frs debian/$(pkg_common_name)/lib/firmware/updates/intel/ice/ddp/ice-*.pkg debian/$(pkg_common_name)/lib/firmware/intel/ice/ddp/stx-ice.pkg override_dh_strip: -# dh_strip -# find debian -name '*.ko' | xargs strip -g + dh_strip + find debian -name '*.ko' | xargs strip -g ifeq ($(WITH_MOD_SIGN),1) -# @echo "Sign the modules!" -# /usr/lib/linux@KERNEL_TYPE@-kbuild-*/scripts/sign-file sha256 $(privkey) $(pubkey) \ - ./debian/$(pkg_name)/lib/modules/$(kversion)/updates/$(kmod_name)-$(bundle_version)/$(kmod_name).ko + @echo "Sign the modules!" + /usr/lib/linux@KERNEL_TYPE@-kbuild-*/scripts/sign-file sha256 $(privkey) $(pubkey) \ + ./debian/$(pkg_name)/lib/modules/$(kversion)/weak-updates/$(kmod_name)-$(bundle_version)/$(kmod_name).ko endif override_dh_auto_build: unzip -d ddp_comms 800-Series-DDP-Comms-Package-*.zip unzip -d ice_comms ddp_comms/ice_comms*.zip -# dh_auto_build -D ./src + dh_auto_build -D ./src diff --git a/kernel-modules/intel-igb_uio/debian/deb_folder/patches/0001-linux-igb_uio-fix-build-with-kernel-5.18.patch b/kernel-modules/intel-igb_uio/debian/deb_folder/patches/0001-linux-igb_uio-fix-build-with-kernel-5.18.patch new file mode 100644 index 00000000..86d3a98d --- /dev/null +++ b/kernel-modules/intel-igb_uio/debian/deb_folder/patches/0001-linux-igb_uio-fix-build-with-kernel-5.18.patch @@ -0,0 +1,50 @@ +From ef5b6faad33943363f9576d20169c03154e48d6b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Georg=20M=C3=BCller?= +Date: Thu, 6 Oct 2022 20:51:37 +0200 +Subject: [PATCH] linux/igb_uio: fix build with kernel 5.18+ + +pci_set_dma_mask() and pci_set_consistent_dma_mask() were removed with +kernel 5.18. They both were just wrappers for dma_set_mask() and +dma_set_coherent_mask(). + +Instead, use dma_set_mask_and_coherent(), which is a combination of +dma_set_mask() and dma_set_coherent_mask(). + +dma_set_mask_and_coherent() exists since kernel 3.13. + +Signed-off-by: Georg Müller +(cherry picked from commit 29b1c1e43014099548bb9424749cbc062e16a087) +[jma: This commit was cherry-picked from + http://git.dpdk.org/dpdk-kmods/commit/?id=29b1c1e43] +Signed-off-by: Jiping Ma +--- + linux/igb_uio/igb_uio.c | 8 +------- + 1 file changed, 1 insertion(+), 7 deletions(-) + +diff --git a/linux/igb_uio/igb_uio.c b/linux/igb_uio/igb_uio.c +index ea439d1..f1c1601 100644 +--- a/linux/igb_uio/igb_uio.c ++++ b/linux/igb_uio/igb_uio.c +@@ -512,18 +512,12 @@ igbuio_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) + goto fail_release_iomem; + + /* set 64-bit DMA mask */ +- err = pci_set_dma_mask(dev, DMA_BIT_MASK(64)); ++ err = dma_set_mask_and_coherent(&dev->dev, DMA_BIT_MASK(64)); + if (err != 0) { + dev_err(&dev->dev, "Cannot set DMA mask\n"); + goto fail_release_iomem; + } + +- err = pci_set_consistent_dma_mask(dev, DMA_BIT_MASK(64)); +- if (err != 0) { +- dev_err(&dev->dev, "Cannot set consistent DMA mask\n"); +- goto fail_release_iomem; +- } +- + /* fill uio infos */ + udev->info.name = "igb_uio"; + udev->info.version = "0.1"; +-- +2.42.0 + diff --git a/kernel-modules/intel-igb_uio/debian/deb_folder/patches/series b/kernel-modules/intel-igb_uio/debian/deb_folder/patches/series new file mode 100644 index 00000000..586c44b5 --- /dev/null +++ b/kernel-modules/intel-igb_uio/debian/deb_folder/patches/series @@ -0,0 +1 @@ +0001-linux-igb_uio-fix-build-with-kernel-5.18.patch diff --git a/kernel-modules/intel-opae-fpga/debian/deb_folder/patches/Fix-build-errors.patch b/kernel-modules/intel-opae-fpga/debian/deb_folder/patches/0001-Fix-build-errors.patch similarity index 96% rename from kernel-modules/intel-opae-fpga/debian/deb_folder/patches/Fix-build-errors.patch rename to kernel-modules/intel-opae-fpga/debian/deb_folder/patches/0001-Fix-build-errors.patch index 3230518f..c645065f 100644 --- a/kernel-modules/intel-opae-fpga/debian/deb_folder/patches/Fix-build-errors.patch +++ b/kernel-modules/intel-opae-fpga/debian/deb_folder/patches/0001-Fix-build-errors.patch @@ -1,7 +1,7 @@ -From 262f8cbac0e4699edfcc5d1027479f85f9c8177f Mon Sep 17 00:00:00 2001 +From 79e1ca15d18ba9f7f60c96d04c35935f15ac4075 Mon Sep 17 00:00:00 2001 From: Jiping Ma Date: Sun, 27 Jun 2021 23:13:51 -0700 -Subject: [PATCH 1/2] Fix build errors. +Subject: [PATCH 1/5] Fix build errors. Fix the following issues. 1. readx_poll_timeout redefined @@ -100,5 +100,5 @@ index 4183125..25d6d84 100644 #include #include -- -2.31.1 +2.42.0 diff --git a/kernel-modules/intel-opae-fpga/debian/deb_folder/patches/use-altera.h-from-driver-instead-of-from-kernel.patch b/kernel-modules/intel-opae-fpga/debian/deb_folder/patches/0002-use-altera.h-from-driver-instead-of-from-kernel.patch similarity index 96% rename from kernel-modules/intel-opae-fpga/debian/deb_folder/patches/use-altera.h-from-driver-instead-of-from-kernel.patch rename to kernel-modules/intel-opae-fpga/debian/deb_folder/patches/0002-use-altera.h-from-driver-instead-of-from-kernel.patch index 95ea7838..ff07a402 100644 --- a/kernel-modules/intel-opae-fpga/debian/deb_folder/patches/use-altera.h-from-driver-instead-of-from-kernel.patch +++ b/kernel-modules/intel-opae-fpga/debian/deb_folder/patches/0002-use-altera.h-from-driver-instead-of-from-kernel.patch @@ -1,7 +1,7 @@ -From 6371907d1b4809fe6c1cb02a4a9dc8b2a18999fa Mon Sep 17 00:00:00 2001 +From e673fd7df86ceebe7bb8d197be10e1b441bc2610 Mon Sep 17 00:00:00 2001 From: Jiping Ma Date: Wed, 23 Jun 2021 23:38:47 -0700 -Subject: [PATCH] use altera.h from driver instead of from kernel +Subject: [PATCH 2/5] use altera.h from driver instead of from kernel linux/spi/altera.h in Kernel is very different from the file in opae-intel-fpga-driver. So we use the @@ -97,7 +97,7 @@ index 29b2cc0..857cf87 100644 #include diff --git a/drivers/spi/spi-altera-4-12.c b/drivers/spi/spi-altera-4-12.c -index 9cc2f27..a67b87b 100644 +index 9cc2f27..0a87040 100644 --- a/drivers/spi/spi-altera-4-12.c +++ b/drivers/spi/spi-altera-4-12.c @@ -19,7 +19,7 @@ @@ -110,5 +110,5 @@ index 9cc2f27..a67b87b 100644 #include #include -- -2.31.1 +2.42.0 diff --git a/kernel-modules/intel-opae-fpga/debian/deb_folder/patches/0003-remove-module-from-class_create.patch b/kernel-modules/intel-opae-fpga/debian/deb_folder/patches/0003-remove-module-from-class_create.patch new file mode 100644 index 00000000..84a1b54f --- /dev/null +++ b/kernel-modules/intel-opae-fpga/debian/deb_folder/patches/0003-remove-module-from-class_create.patch @@ -0,0 +1,77 @@ +From 5b12b6b093d22773943b49d907ab78b2c643dde1 Mon Sep 17 00:00:00 2001 +From: Jiping Ma +Date: Mon, 18 Mar 2024 05:51:27 -0700 +Subject: [PATCH 3/5] remove module * from class_create() + +This commit accommodates commit dcfbb67e48a2 ("driver core: class: +use lock_class_key already present in struct subsys_private"), +which removes the module pointer. This commit was merged in the +v6.4 development cycle and causes compilation failures with the +v6.6 kernel, which are listed below. + +References: +* https://git.yoctoproject.org/linux-yocto/commit/?h=1aaba11da9aa +* https://git.yoctoproject.org/linux-yocto/commit/?h=dcfbb67e48a2 + +Resolved compilation errors: + +drivers/fpga/intel/pcie.c:1494:28: note: in expansion of macro THIS_MODULE + 1494 | fpga_class = class_create(THIS_MODULE, "fpga"); + | ^~~~~~~~~~~ + +In file included from /usr/src/linux-rt-headers-6.6.0-1-rt-common/include/linux/device.h:31, + from /usr/src/linux-rt-headers-6.6.0-1-rt-common/include/linux/pci.h:37, + from /<>/drivers/fpga/intel/pcie.c:21: +/usr/src/linux-rt-headers-6.6.0-1-rt-common/include/linux/device/class.h:230:54: + note: expected const char * but argument is of type struct module * + 230 | struct class * __must_check class_create(const char *name); + +Signed-off-by: Jiping Ma +--- + drivers/fpga/fpga-mgr.c | 2 +- + drivers/fpga/intel/ifpga-sec-mgr.c | 2 +- + drivers/fpga/intel/pcie.c | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/drivers/fpga/fpga-mgr.c b/drivers/fpga/fpga-mgr.c +index bd08b0b..5870127 100644 +--- a/drivers/fpga/fpga-mgr.c ++++ b/drivers/fpga/fpga-mgr.c +@@ -564,7 +564,7 @@ static int __init fpga_mgr_class_init(void) + { + pr_info("FPGA manager framework\n"); + +- fpga_mgr_class = class_create(THIS_MODULE, "fpga_manager"); ++ fpga_mgr_class = class_create("fpga_manager"); + if (IS_ERR(fpga_mgr_class)) + return PTR_ERR(fpga_mgr_class); + +diff --git a/drivers/fpga/intel/ifpga-sec-mgr.c b/drivers/fpga/intel/ifpga-sec-mgr.c +index 432a175..d58a209 100644 +--- a/drivers/fpga/intel/ifpga-sec-mgr.c ++++ b/drivers/fpga/intel/ifpga-sec-mgr.c +@@ -283,7 +283,7 @@ static int __init ifpga_sec_mgr_class_init(void) + + pr_info("Intel FPGA Security Manager\n"); + +- ifpga_sec_mgr_class = class_create(THIS_MODULE, "ifpga_sec_mgr"); ++ ifpga_sec_mgr_class = class_create("ifpga_sec_mgr"); + if (IS_ERR(ifpga_sec_mgr_class)) + return PTR_ERR(ifpga_sec_mgr_class); + +diff --git a/drivers/fpga/intel/pcie.c b/drivers/fpga/intel/pcie.c +index 36d54b5..bf92747 100644 +--- a/drivers/fpga/intel/pcie.c ++++ b/drivers/fpga/intel/pcie.c +@@ -1491,7 +1491,7 @@ static int __init ccidrv_init(void) + if (ret) + goto exit_ids; + +- fpga_class = class_create(THIS_MODULE, "fpga"); ++ fpga_class = class_create("fpga"); + if (IS_ERR(fpga_class)) { + ret = PTR_ERR(fpga_class); + goto exit_chardev; +-- +2.42.0 + diff --git a/kernel-modules/intel-opae-fpga/debian/deb_folder/patches/0004-Remove-redundant-pci_enable_pcie_error_reporting.patch b/kernel-modules/intel-opae-fpga/debian/deb_folder/patches/0004-Remove-redundant-pci_enable_pcie_error_reporting.patch new file mode 100644 index 00000000..1aaf4f4e --- /dev/null +++ b/kernel-modules/intel-opae-fpga/debian/deb_folder/patches/0004-Remove-redundant-pci_enable_pcie_error_reporting.patch @@ -0,0 +1,71 @@ +From 0bb74ba85653d869b4a28dcb0f8e834a170dad9a Mon Sep 17 00:00:00 2001 +From: Jiping Ma +Date: Mon, 18 Mar 2024 05:54:48 -0700 +Subject: [PATCH 4/5] Remove redundant pci_enable_pcie_error_reporting() + +We remove the calls to the pci_enable_pcie_error_reporting and +pci_disable_pcie_error_reporting API functions, which were made redundant +with commit f26e58bf6f54 ("PCI/AER: Enable error reporting when AER is +native") and removed from the kernel with commit 69b264df8a41 ("PCI/AER: +Drop unused pci_disable_pcie_error_reporting()") in the v6.6 development +cycle. + +The approach taken in this commit was adapted from commit ba153552c18d +("ice: Remove redundant pci_enable_pcie_error_reporting()"), as the +nature of the encountered build failure (listed below) is the same. + +References: +* https://git.yoctoproject.org/linux-yocto/commit/?h=f26e58bf6f54 +* https://git.yoctoproject.org/linux-yocto/commit/?h=69b264df8a41 +* https://git.yoctoproject.org/linux-yocto/commit/?h=ba153552c18d + +Resolved compilation errors: + +drivers/fpga/intel/pcie.c:1396:8: error: implicit declaration of function\ + pci_enable_pcie_error_reporting [-Werror=implicit-function-declaration] + 1396 | ret = pci_enable_pcie_error_reporting(pcidev); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +drivers/fpga/intel/pcie.c:1443:2: error: implicit declaration of function\ + pci_disable_pcie_error_reporting [-Werror=implicit-function-declaration] + 1443 | pci_disable_pcie_error_reporting(pcidev); + +Signed-off-by: Jiping Ma +--- + drivers/fpga/intel/pcie.c | 7 ------- + 1 file changed, 7 deletions(-) + +diff --git a/drivers/fpga/intel/pcie.c b/drivers/fpga/intel/pcie.c +index bf92747..cf25e07 100644 +--- a/drivers/fpga/intel/pcie.c ++++ b/drivers/fpga/intel/pcie.c +@@ -1393,10 +1393,6 @@ int cci_pci_probe(struct pci_dev *pcidev, const struct pci_device_id *pcidevid) + goto exit; + } + +- ret = pci_enable_pcie_error_reporting(pcidev); +- if (ret && ret != -EINVAL) +- dev_info(&pcidev->dev, "PCIE AER unavailable %d.\n", ret); +- + ret = pci_request_regions(pcidev, DRV_NAME); + if (ret) { + dev_err(&pcidev->dev, "Failed to request regions.\n"); +@@ -1440,7 +1436,6 @@ destroy_drvdata_exit: + release_region_exit: + pci_release_regions(pcidev); + disable_error_report_exit: +- pci_disable_pcie_error_reporting(pcidev); + pci_disable_device(pcidev); + exit: + return ret; +@@ -1463,8 +1458,6 @@ void cci_pci_remove(struct pci_dev *pcidev) + + remove_all_devs(pcidev); + +- pci_disable_pcie_error_reporting(pcidev); +- + cci_pci_free_irq(pcidev); + destroy_drvdata(pcidev); + pci_release_regions(pcidev); +-- +2.42.0 + diff --git a/kernel-modules/intel-opae-fpga/debian/deb_folder/patches/0005-make-remove-callback-a-void-function.patch b/kernel-modules/intel-opae-fpga/debian/deb_folder/patches/0005-make-remove-callback-a-void-function.patch new file mode 100644 index 00000000..6a1df4ca --- /dev/null +++ b/kernel-modules/intel-opae-fpga/debian/deb_folder/patches/0005-make-remove-callback-a-void-function.patch @@ -0,0 +1,46 @@ +From c341e9c8e35d1babc63102921869b807d6126174 Mon Sep 17 00:00:00 2001 +From: Jiping Ma +Date: Mon, 18 Mar 2024 05:56:47 -0700 +Subject: [PATCH 5/5] make remove callback a void function + +This commit accommodates commit a0386bba7093 ("spi: make remove callback +a void function") which was merged in the v5.18 development cycle. The +commit in question makes the "spi_driver" structure's "remove" callback a +void function. Apply a similar change to the intel-opae-fpga driver to +allow it to build against kernel version 6.6. + +drivers/mfd/intel-max10-main.c:3162:12: error: initialization of \ + void (*)(struct spi_device *) from incompatible pointer type \ + int (*)(struct spi_device *) [-Werror=incompatible-pointer-types] + 3162 | .remove = intel_max10_spi_remove, + +Signed-off-by: Jiping Ma +--- + drivers/mfd/intel-max10-main.c | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +diff --git a/drivers/mfd/intel-max10-main.c b/drivers/mfd/intel-max10-main.c +index 5f52682..5368c82 100644 +--- a/drivers/mfd/intel-max10-main.c ++++ b/drivers/mfd/intel-max10-main.c +@@ -3141,7 +3141,7 @@ rm_br: + return ret; + } + +-static int intel_max10_spi_remove(struct spi_device *spi) ++static void intel_max10_spi_remove(struct spi_device *spi) + { + struct intel_max10 *max10 = spi_get_drvdata(spi); + +@@ -3153,8 +3153,6 @@ static int intel_max10_spi_remove(struct spi_device *spi) + max10_hardware_uinit(max10); + + spi_avmm_bridge_destroy(max10->bridge); +- +- return 0; + } + + static struct spi_driver intel_max10_spi_driver = { +-- +2.42.0 + diff --git a/kernel-modules/intel-opae-fpga/debian/deb_folder/patches/series b/kernel-modules/intel-opae-fpga/debian/deb_folder/patches/series index e080c069..e99c7d67 100644 --- a/kernel-modules/intel-opae-fpga/debian/deb_folder/patches/series +++ b/kernel-modules/intel-opae-fpga/debian/deb_folder/patches/series @@ -1,2 +1,5 @@ -Fix-build-errors.patch -use-altera.h-from-driver-instead-of-from-kernel.patch +0001-Fix-build-errors.patch +0002-use-altera.h-from-driver-instead-of-from-kernel.patch +0003-remove-module-from-class_create.patch +0004-Remove-redundant-pci_enable_pcie_error_reporting.patch +0005-make-remove-callback-a-void-function.patch diff --git a/kernel-modules/intel-qv/debian/deb_folder/patches/0002-switch-from-pci_-to-dma_-API.patch b/kernel-modules/intel-qv/debian/deb_folder/patches/0002-switch-from-pci_-to-dma_-API.patch new file mode 100644 index 00000000..f1e80d33 --- /dev/null +++ b/kernel-modules/intel-qv/debian/deb_folder/patches/0002-switch-from-pci_-to-dma_-API.patch @@ -0,0 +1,118 @@ +From 1de2057d668621d1de8a37e0cca7e583b531ae16 Mon Sep 17 00:00:00 2001 +From: Jiping Ma +Date: Tue, 5 Mar 2024 08:48:53 +0000 +Subject: [PATCH] switch from 'pci_' to 'dma_' API + +The wrappers in include/linux/pci-dma-compat.h had gone away. + +It has been hand modified to use 'dma_set_mask_and_coherent()' instead of +'pci_set_dma_mask()/pci_set_consistent_dma_mask()' when applicable. +This is less verbose. + +expression e1, e2, e3, e4; +@@ +- pci_free_consistent(e1, e2, e3, e4) ++ dma_free_coherent(&e1->dev, e2, e3, e4) + +@@ +expression e1, e2, e3; +@@ +- pci_alloc_consistent(e1, e2, e3) ++ dma_alloc_coherent(&e1->dev, e2, e3, GFP_) + +Refer link: +https://git.yoctoproject.org/linux-yocto/commit/?h=d56baf6ef + +src/linux/driver/linuxdrivermemory_i.c:210:22: error: implicit declaration of\ + function pci_alloc_consistent [-Werror=implicit-function-declaration] + 210 | Allocation = pci_alloc_consistent(LinuxPciDevice, ByteCount, &Dma); + | ^~~~~~~~~~~~~~~~~~~~ +src/linux/driver/linuxdrivermemory_i.c:210:20: warning: assignment to void from\ + int makes pointer from integer without a cast [-Wint-conversion] + 210 | Allocation = pci_alloc_consistent(LinuxPciDevice, ByteCount, &Dma); + | ^ +src/linux/driver/linuxdriverdevice_i.c: In function _NalEnableDevice: +src/linux/driver/linuxdriverdevice_i.c:541:13: error: implicit declaration of\ + function pci_set_dma_mask; did you mean ipi_send_mask \ + [-Werror=implicit-function-declaration] + 541 | if (pci_set_dma_mask(PciDevice, DMA_BIT_MASK(64)) || + | ^~~~~~~~~~~~~~~~ + | ipi_send_mask +src/linux/driver/linuxdrivermemory_i.c:218:13: error: implicit declaration \ + of function pci_free_consistent [-Werror=implicit-function-declaration] + 218 | pci_free_consistent(LinuxPciDevice, ByteCount, Allocation, Dma); + | ^~~~~~~~~~~~~~~~~~~ +src/linux/driver/linuxdriverdevice_i.c:542:13: error: implicit declaration of \ + function pci_set_consistent_dma_mask [-Werror=implicit-function-declaration] + 542 | pci_set_consistent_dma_mask(PciDevice, DMA_BIT_MASK(64))) + +Signed-off-by: Jiping Ma +--- + src/linux/driver/linuxdriverdevice_i.c | 10 ++++------ + src/linux/driver/linuxdrivermemory_i.c | 6 +++--- + 2 files changed, 7 insertions(+), 9 deletions(-) + +diff --git a/src/linux/driver/linuxdriverdevice_i.c b/src/linux/driver/linuxdriverdevice_i.c +index 06db185..6025649 100644 +--- a/src/linux/driver/linuxdriverdevice_i.c ++++ b/src/linux/driver/linuxdriverdevice_i.c +@@ -538,11 +538,9 @@ _NalEnableDevice( + break; + } + +- if (pci_set_dma_mask(PciDevice, DMA_BIT_MASK(64)) || +- pci_set_consistent_dma_mask(PciDevice, DMA_BIT_MASK(64))) ++ if (dma_set_mask_and_coherent(&PciDevice->dev, DMA_BIT_MASK(64))) + { +- if (pci_set_dma_mask(PciDevice, DMA_BIT_MASK(32)) || +- pci_set_consistent_dma_mask(PciDevice, DMA_BIT_MASK(32))) ++ if (dma_set_mask_and_coherent(&PciDevice->dev, DMA_BIT_MASK(32))) + { + printk(KERN_DEBUG "No usable DMA configuration, aborting\n"); + NalStatus = NAL_DMA_NOT_SUPPORTED; +@@ -624,9 +622,9 @@ _NalFillDeviceResource( + break; + } + +- if (pci_set_dma_mask(PciDevice, DMA_BIT_MASK(64))) ++ if (dma_set_mask(&PciDevice->dev, DMA_BIT_MASK(64))) + { +- if (pci_set_dma_mask(PciDevice, DMA_BIT_MASK(32))) ++ if (dma_set_mask(&PciDevice->dev, DMA_BIT_MASK(32))) + { + printk(KERN_DEBUG "No usable DMA configuration, aborting\n"); + NalStatus = NAL_DMA_NOT_SUPPORTED; +diff --git a/src/linux/driver/linuxdrivermemory_i.c b/src/linux/driver/linuxdrivermemory_i.c +index 93771d0..6393d39 100644 +--- a/src/linux/driver/linuxdrivermemory_i.c ++++ b/src/linux/driver/linuxdrivermemory_i.c +@@ -207,7 +207,7 @@ _NalAllocateMemoryNonPagedPci( + break; + } + +- Allocation = pci_alloc_consistent(LinuxPciDevice, ByteCount, &Dma); ++ Allocation = dma_alloc_coherent(&LinuxPciDevice->dev, ByteCount, &Dma, GFP_ATOMIC); + if(Allocation == NULL) + { + break; +@@ -215,7 +215,7 @@ _NalAllocateMemoryNonPagedPci( + + if(Dma % Alignment != 0) + { +- pci_free_consistent(LinuxPciDevice, ByteCount, Allocation, Dma); ++ dma_free_coherent(&LinuxPciDevice->dev, ByteCount, Allocation, Dma); + Allocation = NULL; + break; + } +@@ -297,7 +297,7 @@ NalFreeMemoryNonPagedPci( + if((Global_DmaPciMemoryTable[i].ReferenceCount != 0) && + (Global_DmaPciMemoryTable[i].KernelAddress == Address)) + { +- pci_free_consistent(LinuxPciDevice, ++ dma_free_coherent(&LinuxPciDevice->dev, + Global_DmaPciMemoryTable[i].Size, + Global_DmaPciMemoryTable[i].KernelAddress, + Global_DmaPciMemoryTable[i].PhysicalAddress); +-- +2.43.0 + diff --git a/kernel-modules/intel-qv/debian/deb_folder/patches/series b/kernel-modules/intel-qv/debian/deb_folder/patches/series index f26195d0..d20ecf07 100644 --- a/kernel-modules/intel-qv/debian/deb_folder/patches/series +++ b/kernel-modules/intel-qv/debian/deb_folder/patches/series @@ -1 +1,2 @@ 0001-Do-not-disable-module-signing.patch +0002-switch-from-pci_-to-dma_-API.patch