From: Greg Kroah-Hartman Date: Mon, 14 Jul 2025 13:00:12 +0000 (+0200) Subject: drop the igc patches from 5.10.y X-Git-Tag: v5.15.188~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d9cb7c16a41f1b56c12a63f7eb5b318a51df993c;p=thirdparty%2Fkernel%2Fstable-queue.git drop the igc patches from 5.10.y Too many dependancies just for a new id. Not worth it. --- diff --git a/queue-5.10/igc-add-new-device-id.patch b/queue-5.10/igc-add-new-device-id.patch deleted file mode 100644 index 01ee95afc7..0000000000 --- a/queue-5.10/igc-add-new-device-id.patch +++ /dev/null @@ -1,63 +0,0 @@ -From dc4b80ebff96320bf504f80c0ad104d869b2cff9 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Thu, 10 Dec 2020 11:08:12 -0800 -Subject: igc: Add new device ID - -From: Sasha Neftin - -[ Upstream commit bfa5e98c9de466bfe25a9b4bf6ef9122aee2d06a ] - -Add new device ID for the next step of the silicon and -reflect the I226_K part. - -Signed-off-by: Sasha Neftin -Tested-by: Aaron Brown -Signed-off-by: Tony Nguyen -Signed-off-by: David S. Miller -Stable-dep-of: 0325143b59c6 ("igc: disable L1.2 PCI-E link substate to avoid performance issue") -Signed-off-by: Sasha Levin ---- - drivers/net/ethernet/intel/igc/igc_base.c | 1 + - drivers/net/ethernet/intel/igc/igc_hw.h | 1 + - drivers/net/ethernet/intel/igc/igc_main.c | 1 + - 3 files changed, 3 insertions(+) - -diff --git a/drivers/net/ethernet/intel/igc/igc_base.c b/drivers/net/ethernet/intel/igc/igc_base.c -index 7f3523f0d196f..84f142f5e472e 100644 ---- a/drivers/net/ethernet/intel/igc/igc_base.c -+++ b/drivers/net/ethernet/intel/igc/igc_base.c -@@ -205,6 +205,7 @@ static s32 igc_get_invariants_base(struct igc_hw *hw) - case IGC_DEV_ID_I220_V: - case IGC_DEV_ID_I225_K: - case IGC_DEV_ID_I225_K2: -+ case IGC_DEV_ID_I226_K: - case IGC_DEV_ID_I225_LMVP: - case IGC_DEV_ID_I225_IT: - case IGC_DEV_ID_I226_LM: -diff --git a/drivers/net/ethernet/intel/igc/igc_hw.h b/drivers/net/ethernet/intel/igc/igc_hw.h -index 7e29f41f70e0b..3ca8d2ac29c2d 100644 ---- a/drivers/net/ethernet/intel/igc/igc_hw.h -+++ b/drivers/net/ethernet/intel/igc/igc_hw.h -@@ -24,6 +24,7 @@ - #define IGC_DEV_ID_I225_K2 0x3101 - #define IGC_DEV_ID_I226_K 0x3102 - #define IGC_DEV_ID_I225_LMVP 0x5502 -+#define IGC_DEV_ID_I226_K 0x5504 - #define IGC_DEV_ID_I225_IT 0x0D9F - #define IGC_DEV_ID_I226_LM 0x125B - #define IGC_DEV_ID_I226_V 0x125C -diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c -index 7593e8b7469c5..192fd4e73dfe2 100644 ---- a/drivers/net/ethernet/intel/igc/igc_main.c -+++ b/drivers/net/ethernet/intel/igc/igc_main.c -@@ -46,6 +46,7 @@ static const struct pci_device_id igc_pci_tbl[] = { - { PCI_VDEVICE(INTEL, IGC_DEV_ID_I220_V), board_base }, - { PCI_VDEVICE(INTEL, IGC_DEV_ID_I225_K), board_base }, - { PCI_VDEVICE(INTEL, IGC_DEV_ID_I225_K2), board_base }, -+ { PCI_VDEVICE(INTEL, IGC_DEV_ID_I226_K), board_base }, - { PCI_VDEVICE(INTEL, IGC_DEV_ID_I225_LMVP), board_base }, - { PCI_VDEVICE(INTEL, IGC_DEV_ID_I225_IT), board_base }, - { PCI_VDEVICE(INTEL, IGC_DEV_ID_I226_LM), board_base }, --- -2.39.5 - diff --git a/queue-5.10/igc-allow-basetime-0-enrollment-for-qbv.patch b/queue-5.10/igc-allow-basetime-0-enrollment-for-qbv.patch deleted file mode 100644 index 965c1ae5c3..0000000000 --- a/queue-5.10/igc-allow-basetime-0-enrollment-for-qbv.patch +++ /dev/null @@ -1,56 +0,0 @@ -From e17090eb24944fbbe1f24d9f336d7bad4fbe47e8 Mon Sep 17 00:00:00 2001 -From: Tan Tee Min -Date: Fri, 9 Dec 2022 12:15:20 +0800 -Subject: igc: allow BaseTime 0 enrollment for Qbv - -From: Tan Tee Min - -commit e17090eb24944fbbe1f24d9f336d7bad4fbe47e8 upstream. - -Introduce qbv_enable flag in igc_adapter struct to store the Qbv on/off. -So this allow the BaseTime to enroll with zero value. - -Fixes: 61572d5f8f91 ("igc: Simplify TSN flags handling") -Signed-off-by: Muhammad Husaini Zulkifli -Signed-off-by: Tan Tee Min -Tested-by: Naama Meir -Signed-off-by: Tony Nguyen -Signed-off-by: Greg Kroah-Hartman ---- - drivers/net/ethernet/intel/igc/igc.h | 1 + - drivers/net/ethernet/intel/igc/igc_main.c | 2 ++ - drivers/net/ethernet/intel/igc/igc_tsn.c | 2 +- - 3 files changed, 4 insertions(+), 1 deletion(-) - ---- a/drivers/net/ethernet/intel/igc/igc.h -+++ b/drivers/net/ethernet/intel/igc/igc.h -@@ -168,6 +168,7 @@ struct igc_adapter { - - ktime_t base_time; - ktime_t cycle_time; -+ bool qbv_enable; - - /* OS defined structs */ - struct pci_dev *pdev; ---- a/drivers/net/ethernet/intel/igc/igc_main.c -+++ b/drivers/net/ethernet/intel/igc/igc_main.c -@@ -4943,6 +4943,8 @@ static int igc_save_qbv_schedule(struct - size_t n; - int i; - -+ adapter->qbv_enable = qopt->enable; -+ - if (!qopt->enable) { - adapter->base_time = 0; - return 0; ---- a/drivers/net/ethernet/intel/igc/igc_tsn.c -+++ b/drivers/net/ethernet/intel/igc/igc_tsn.c -@@ -23,7 +23,7 @@ static unsigned int igc_tsn_new_flags(st - { - unsigned int new_flags = adapter->flags & ~IGC_FLAG_TSN_ANY_ENABLED; - -- if (adapter->base_time) -+ if (adapter->qbv_enable) - new_flags |= IGC_FLAG_TSN_QBV_ENABLED; - - if (is_any_launchtime(adapter)) diff --git a/queue-5.10/igc-disable-l1.2-pci-e-link-substate-to-avoid-perfor.patch b/queue-5.10/igc-disable-l1.2-pci-e-link-substate-to-avoid-perfor.patch deleted file mode 100644 index 8d491e6b5e..0000000000 --- a/queue-5.10/igc-disable-l1.2-pci-e-link-substate-to-avoid-perfor.patch +++ /dev/null @@ -1,66 +0,0 @@ -From caf94cde7108a6f198c7d51f0ff5ef158d911100 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Wed, 11 Jun 2025 15:52:54 +0300 -Subject: igc: disable L1.2 PCI-E link substate to avoid performance issue - -From: Vitaly Lifshits - -[ Upstream commit 0325143b59c6c6d79987afc57d2456e7a20d13b7 ] - -I226 devices advertise support for the PCI-E link L1.2 substate. However, -due to a hardware limitation, the exit latency from this low-power state -is longer than the packet buffer can tolerate under high traffic -conditions. This can lead to packet loss and degraded performance. - -To mitigate this, disable the L1.2 substate. The increased power draw -between L1.1 and L1.2 is insignificant. - -Fixes: 43546211738e ("igc: Add new device ID's") -Link: https://lore.kernel.org/intel-wired-lan/15248b4f-3271-42dd-8e35-02bfc92b25e1@intel.com -Signed-off-by: Vitaly Lifshits -Reviewed-by: Aleksandr Loktionov -Tested-by: Mor Bar-Gabay -Signed-off-by: Tony Nguyen -Signed-off-by: Sasha Levin ---- - drivers/net/ethernet/intel/igc/igc_main.c | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c -index 76efb5bf819e7..71507d7f564d1 100644 ---- a/drivers/net/ethernet/intel/igc/igc_main.c -+++ b/drivers/net/ethernet/intel/igc/igc_main.c -@@ -5244,6 +5244,10 @@ static int igc_probe(struct pci_dev *pdev, - adapter->port_num = hw->bus.func; - adapter->msg_enable = netif_msg_init(debug, DEFAULT_MSG_ENABLE); - -+ /* Disable ASPM L1.2 on I226 devices to avoid packet loss */ -+ if (igc_is_device_id_i226(hw)) -+ pci_disable_link_state(pdev, PCIE_LINK_STATE_L1_2); -+ - err = pci_save_state(pdev); - if (err) - goto err_ioremap; -@@ -5601,6 +5605,9 @@ static int __maybe_unused igc_resume(struct device *dev) - pci_enable_wake(pdev, PCI_D3hot, 0); - pci_enable_wake(pdev, PCI_D3cold, 0); - -+ if (igc_is_device_id_i226(hw)) -+ pci_disable_link_state(pdev, PCIE_LINK_STATE_L1_2); -+ - if (igc_init_interrupt_scheme(adapter, true)) { - netdev_err(netdev, "Unable to allocate memory for queues\n"); - return -ENOMEM; -@@ -5716,6 +5723,9 @@ static pci_ers_result_t igc_io_slot_reset(struct pci_dev *pdev) - pci_enable_wake(pdev, PCI_D3hot, 0); - pci_enable_wake(pdev, PCI_D3cold, 0); - -+ if (igc_is_device_id_i226(hw)) -+ pci_disable_link_state_locked(pdev, PCIE_LINK_STATE_L1_2); -+ - /* In case of PCI error, adapter loses its HW address - * so we should re-assign it here. - */ --- -2.39.5 - diff --git a/queue-5.10/igc-remove-i226-qbv-basetime-restriction.patch b/queue-5.10/igc-remove-i226-qbv-basetime-restriction.patch deleted file mode 100644 index 627400976e..0000000000 --- a/queue-5.10/igc-remove-i226-qbv-basetime-restriction.patch +++ /dev/null @@ -1,221 +0,0 @@ -From e498dcb8e1c609b53f68fd72199d09f5b0a3f956 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Thu, 15 Dec 2022 00:29:07 +0800 -Subject: igc: remove I226 Qbv BaseTime restriction - -From: Muhammad Husaini Zulkifli - -[ Upstream commit b8897dc54e3bc9d25281bbb42a7d730782ff4588 ] - -Remove the Qbv BaseTime restriction for I226 so that the BaseTime can be -scheduled to the future time. A new register bit of Tx Qav Control -(Bit-7: FutScdDis) was introduced to allow I226 scheduling future time as -Qbv BaseTime and not having the Tx hang timeout issue. - -Besides, according to datasheet section 7.5.2.9.3.3, FutScdDis bit has to -be configured first before the cycle time and base time. - -Indeed the FutScdDis bit is only active on re-configuration, thus we have -to set the BASET_L to zero and then only set it to the desired value. - -Please also note that the Qbv configuration flow is moved around based on -the Qbv programming guideline that is documented in the latest datasheet. - -Co-developed-by: Tan Tee Min -Signed-off-by: Tan Tee Min -Signed-off-by: Muhammad Husaini Zulkifli -Tested-by: Naama Meir -Signed-off-by: Tony Nguyen -Stable-dep-of: 0325143b59c6 ("igc: disable L1.2 PCI-E link substate to avoid performance issue") -Signed-off-by: Sasha Levin ---- - drivers/net/ethernet/intel/igc/igc_base.c | 29 +++++++++++++ - drivers/net/ethernet/intel/igc/igc_base.h | 2 + - drivers/net/ethernet/intel/igc/igc_defines.h | 1 + - drivers/net/ethernet/intel/igc/igc_main.c | 5 ++- - drivers/net/ethernet/intel/igc/igc_tsn.c | 44 +++++++++++++------- - 5 files changed, 65 insertions(+), 16 deletions(-) - -diff --git a/drivers/net/ethernet/intel/igc/igc_base.c b/drivers/net/ethernet/intel/igc/igc_base.c -index 84f142f5e472e..be095c6531b68 100644 ---- a/drivers/net/ethernet/intel/igc/igc_base.c -+++ b/drivers/net/ethernet/intel/igc/igc_base.c -@@ -402,6 +402,35 @@ void igc_rx_fifo_flush_base(struct igc_hw *hw) - rd32(IGC_MPC); - } - -+bool igc_is_device_id_i225(struct igc_hw *hw) -+{ -+ switch (hw->device_id) { -+ case IGC_DEV_ID_I225_LM: -+ case IGC_DEV_ID_I225_V: -+ case IGC_DEV_ID_I225_I: -+ case IGC_DEV_ID_I225_K: -+ case IGC_DEV_ID_I225_K2: -+ case IGC_DEV_ID_I225_LMVP: -+ case IGC_DEV_ID_I225_IT: -+ return true; -+ default: -+ return false; -+ } -+} -+ -+bool igc_is_device_id_i226(struct igc_hw *hw) -+{ -+ switch (hw->device_id) { -+ case IGC_DEV_ID_I226_LM: -+ case IGC_DEV_ID_I226_V: -+ case IGC_DEV_ID_I226_K: -+ case IGC_DEV_ID_I226_IT: -+ return true; -+ default: -+ return false; -+ } -+} -+ - static struct igc_mac_operations igc_mac_ops_base = { - .init_hw = igc_init_hw_base, - .check_for_link = igc_check_for_copper_link, -diff --git a/drivers/net/ethernet/intel/igc/igc_base.h b/drivers/net/ethernet/intel/igc/igc_base.h -index ea627ce52525a..73b87a387a3a5 100644 ---- a/drivers/net/ethernet/intel/igc/igc_base.h -+++ b/drivers/net/ethernet/intel/igc/igc_base.h -@@ -7,6 +7,8 @@ - /* forward declaration */ - void igc_rx_fifo_flush_base(struct igc_hw *hw); - void igc_power_down_phy_copper_base(struct igc_hw *hw); -+bool igc_is_device_id_i225(struct igc_hw *hw); -+bool igc_is_device_id_i226(struct igc_hw *hw); - - /* Transmit Descriptor - Advanced */ - union igc_adv_tx_desc { -diff --git a/drivers/net/ethernet/intel/igc/igc_defines.h b/drivers/net/ethernet/intel/igc/igc_defines.h -index 352b50d3881d0..dd337657c3109 100644 ---- a/drivers/net/ethernet/intel/igc/igc_defines.h -+++ b/drivers/net/ethernet/intel/igc/igc_defines.h -@@ -410,6 +410,7 @@ - /* Transmit Scheduling */ - #define IGC_TQAVCTRL_TRANSMIT_MODE_TSN 0x00000001 - #define IGC_TQAVCTRL_ENHANCED_QAV 0x00000008 -+#define IGC_TQAVCTRL_FUTSCDDIS 0x00000080 - - #define IGC_TXQCTL_QUEUE_MODE_LAUNCHT 0x00000001 - #define IGC_TXQCTL_STRICT_CYCLE 0x00000002 -diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c -index dd277ad18a543..76efb5bf819e7 100644 ---- a/drivers/net/ethernet/intel/igc/igc_main.c -+++ b/drivers/net/ethernet/intel/igc/igc_main.c -@@ -4870,6 +4870,7 @@ static bool validate_schedule(struct igc_adapter *adapter, - const struct tc_taprio_qopt_offload *qopt) - { - int queue_uses[IGC_MAX_TX_QUEUES] = { }; -+ struct igc_hw *hw = &adapter->hw; - struct timespec64 now; - size_t n; - -@@ -4882,8 +4883,10 @@ static bool validate_schedule(struct igc_adapter *adapter, - * in the future, it will hold all the packets until that - * time, causing a lot of TX Hangs, so to avoid that, we - * reject schedules that would start in the future. -+ * Note: Limitation above is no longer in i226. - */ -- if (!is_base_time_past(qopt->base_time, &now)) -+ if (!is_base_time_past(qopt->base_time, &now) && -+ igc_is_device_id_i225(hw)) - return false; - - for (n = 0; n < qopt->num_entries; n++) { -diff --git a/drivers/net/ethernet/intel/igc/igc_tsn.c b/drivers/net/ethernet/intel/igc/igc_tsn.c -index e466088cfa3aa..e5ea34f2275c6 100644 ---- a/drivers/net/ethernet/intel/igc/igc_tsn.c -+++ b/drivers/net/ethernet/intel/igc/igc_tsn.c -@@ -2,6 +2,7 @@ - /* Copyright (c) 2019 Intel Corporation */ - - #include "igc.h" -+#include "igc_hw.h" - #include "igc_tsn.h" - - static bool is_any_launchtime(struct igc_adapter *adapter) -@@ -45,7 +46,8 @@ static int igc_tsn_disable_offload(struct igc_adapter *adapter) - - tqavctrl = rd32(IGC_TQAVCTRL); - tqavctrl &= ~(IGC_TQAVCTRL_TRANSMIT_MODE_TSN | -- IGC_TQAVCTRL_ENHANCED_QAV); -+ IGC_TQAVCTRL_ENHANCED_QAV | IGC_TQAVCTRL_FUTSCDDIS); -+ - wr32(IGC_TQAVCTRL, tqavctrl); - - for (i = 0; i < adapter->num_tx_queues; i++) { -@@ -76,20 +78,10 @@ static int igc_tsn_enable_offload(struct igc_adapter *adapter) - ktime_t base_time, systim; - int i; - -- cycle = adapter->cycle_time; -- base_time = adapter->base_time; -- - wr32(IGC_TSAUXC, 0); - wr32(IGC_DTXMXPKTSZ, IGC_DTXMXPKTSZ_TSN); - wr32(IGC_TXPBS, IGC_TXPBSIZE_TSN); - -- tqavctrl = rd32(IGC_TQAVCTRL); -- tqavctrl |= IGC_TQAVCTRL_TRANSMIT_MODE_TSN | IGC_TQAVCTRL_ENHANCED_QAV; -- wr32(IGC_TQAVCTRL, tqavctrl); -- -- wr32(IGC_QBVCYCLET_S, cycle); -- wr32(IGC_QBVCYCLET, cycle); -- - for (i = 0; i < adapter->num_tx_queues; i++) { - struct igc_ring *ring = adapter->tx_ring[i]; - u32 txqctl = 0; -@@ -106,21 +98,43 @@ static int igc_tsn_enable_offload(struct igc_adapter *adapter) - wr32(IGC_TXQCTL(i), txqctl); - } - -+ tqavctrl = rd32(IGC_TQAVCTRL); -+ tqavctrl |= IGC_TQAVCTRL_TRANSMIT_MODE_TSN | IGC_TQAVCTRL_ENHANCED_QAV; -+ -+ cycle = adapter->cycle_time; -+ base_time = adapter->base_time; -+ - nsec = rd32(IGC_SYSTIML); - sec = rd32(IGC_SYSTIMH); - - systim = ktime_set(sec, nsec); -- - if (ktime_compare(systim, base_time) > 0) { -- s64 n; -+ s64 n = div64_s64(ktime_sub_ns(systim, base_time), cycle); - -- n = div64_s64(ktime_sub_ns(systim, base_time), cycle); - base_time = ktime_add_ns(base_time, (n + 1) * cycle); -+ } else { -+ /* According to datasheet section 7.5.2.9.3.3, FutScdDis bit -+ * has to be configured before the cycle time and base time. -+ */ -+ if (igc_is_device_id_i226(hw)) -+ tqavctrl |= IGC_TQAVCTRL_FUTSCDDIS; - } - -- baset_h = div_s64_rem(base_time, NSEC_PER_SEC, &baset_l); -+ wr32(IGC_TQAVCTRL, tqavctrl); -+ -+ wr32(IGC_QBVCYCLET_S, cycle); -+ wr32(IGC_QBVCYCLET, cycle); - -+ baset_h = div_s64_rem(base_time, NSEC_PER_SEC, &baset_l); - wr32(IGC_BASET_H, baset_h); -+ -+ /* In i226, Future base time is only supported when FutScdDis bit -+ * is enabled and only active for re-configuration. -+ * In this case, initialize the base time with zero to create -+ * "re-configuration" scenario then only set the desired base time. -+ */ -+ if (tqavctrl & IGC_TQAVCTRL_FUTSCDDIS) -+ wr32(IGC_BASET_L, 0); - wr32(IGC_BASET_L, baset_l); - - return 0; --- -2.39.5 - diff --git a/queue-5.10/igc-simplify-tsn-flags-handling.patch b/queue-5.10/igc-simplify-tsn-flags-handling.patch deleted file mode 100644 index 606c50fe27..0000000000 --- a/queue-5.10/igc-simplify-tsn-flags-handling.patch +++ /dev/null @@ -1,182 +0,0 @@ -From 46f00dec4a86b216ffd38628ecf641b8dac16549 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Mon, 9 Aug 2021 20:23:39 +0530 -Subject: igc: Simplify TSN flags handling - -From: Vinicius Costa Gomes - -[ Upstream commit 61572d5f8f91d8603d8db028e1ec9e18fc0ca245 ] - -Separates the procedure done during reset from applying a -configuration, knowing when the code is executing allow us to -separate the better what changes the hardware state from what -changes only the driver state. - -Introduces a flag for bookkeeping the driver state of TSN -features. When Qav and frame-preemption is also implemented -this flag makes it easier to keep track on whether a TSN feature -driver state is enabled or not though controller state changes, -say, during a reset. - -Signed-off-by: Vinicius Costa Gomes -Signed-off-by: Aravindhan Gunasekaran -Signed-off-by: Mallikarjuna Chilakala -Tested-by: Dvora Fuxbrumer -Signed-off-by: Tony Nguyen -Stable-dep-of: 0325143b59c6 ("igc: disable L1.2 PCI-E link substate to avoid performance issue") -Signed-off-by: Sasha Levin ---- - drivers/net/ethernet/intel/igc/igc.h | 2 + - drivers/net/ethernet/intel/igc/igc_main.c | 2 +- - drivers/net/ethernet/intel/igc/igc_tsn.c | 65 ++++++++++++++--------- - drivers/net/ethernet/intel/igc/igc_tsn.h | 1 + - 4 files changed, 43 insertions(+), 27 deletions(-) - -diff --git a/drivers/net/ethernet/intel/igc/igc.h b/drivers/net/ethernet/intel/igc/igc.h -index 31af08ceb36b9..31c14bff8f0cf 100644 ---- a/drivers/net/ethernet/intel/igc/igc.h -+++ b/drivers/net/ethernet/intel/igc/igc.h -@@ -270,6 +270,8 @@ extern char igc_driver_name[]; - #define IGC_FLAG_RX_LEGACY BIT(16) - #define IGC_FLAG_TSN_QBV_ENABLED BIT(17) - -+#define IGC_FLAG_TSN_ANY_ENABLED IGC_FLAG_TSN_QBV_ENABLED -+ - #define IGC_FLAG_RSS_FIELD_IPV4_UDP BIT(6) - #define IGC_FLAG_RSS_FIELD_IPV6_UDP BIT(7) - -diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c -index 192fd4e73dfe2..dd277ad18a543 100644 ---- a/drivers/net/ethernet/intel/igc/igc_main.c -+++ b/drivers/net/ethernet/intel/igc/igc_main.c -@@ -109,7 +109,7 @@ void igc_reset(struct igc_adapter *adapter) - igc_ptp_reset(adapter); - - /* Re-enable TSN offloading, where applicable. */ -- igc_tsn_offload_apply(adapter); -+ igc_tsn_reset(adapter); - - igc_get_phy_info(hw); - } -diff --git a/drivers/net/ethernet/intel/igc/igc_tsn.c b/drivers/net/ethernet/intel/igc/igc_tsn.c -index 2d4db2a547b26..e466088cfa3aa 100644 ---- a/drivers/net/ethernet/intel/igc/igc_tsn.c -+++ b/drivers/net/ethernet/intel/igc/igc_tsn.c -@@ -18,8 +18,21 @@ static bool is_any_launchtime(struct igc_adapter *adapter) - return false; - } - -+static unsigned int igc_tsn_new_flags(struct igc_adapter *adapter) -+{ -+ unsigned int new_flags = adapter->flags & ~IGC_FLAG_TSN_ANY_ENABLED; -+ -+ if (adapter->base_time) -+ new_flags |= IGC_FLAG_TSN_QBV_ENABLED; -+ -+ if (is_any_launchtime(adapter)) -+ new_flags |= IGC_FLAG_TSN_QBV_ENABLED; -+ -+ return new_flags; -+} -+ - /* Returns the TSN specific registers to their default values after -- * TSN offloading is disabled. -+ * the adapter is reset. - */ - static int igc_tsn_disable_offload(struct igc_adapter *adapter) - { -@@ -27,11 +40,6 @@ static int igc_tsn_disable_offload(struct igc_adapter *adapter) - u32 tqavctrl; - int i; - -- if (!(adapter->flags & IGC_FLAG_TSN_QBV_ENABLED)) -- return 0; -- -- adapter->cycle_time = 0; -- - wr32(IGC_TXPBS, I225_TXPBSIZE_DEFAULT); - wr32(IGC_DTXMXPKTSZ, IGC_DTXMXPKTSZ_DEFAULT); - -@@ -68,9 +76,6 @@ static int igc_tsn_enable_offload(struct igc_adapter *adapter) - ktime_t base_time, systim; - int i; - -- if (adapter->flags & IGC_FLAG_TSN_QBV_ENABLED) -- return 0; -- - cycle = adapter->cycle_time; - base_time = adapter->base_time; - -@@ -118,33 +123,41 @@ static int igc_tsn_enable_offload(struct igc_adapter *adapter) - wr32(IGC_BASET_H, baset_h); - wr32(IGC_BASET_L, baset_l); - -- adapter->flags |= IGC_FLAG_TSN_QBV_ENABLED; -- - return 0; - } - --int igc_tsn_offload_apply(struct igc_adapter *adapter) -+int igc_tsn_reset(struct igc_adapter *adapter) - { -- bool is_any_enabled = adapter->base_time || is_any_launchtime(adapter); -+ unsigned int new_flags; -+ int err = 0; - -- if (!(adapter->flags & IGC_FLAG_TSN_QBV_ENABLED) && !is_any_enabled) -- return 0; -+ new_flags = igc_tsn_new_flags(adapter); -+ -+ if (!(new_flags & IGC_FLAG_TSN_ANY_ENABLED)) -+ return igc_tsn_disable_offload(adapter); -+ -+ err = igc_tsn_enable_offload(adapter); -+ if (err < 0) -+ return err; - -- if (!is_any_enabled) { -- int err = igc_tsn_disable_offload(adapter); -+ adapter->flags = new_flags; - -- if (err < 0) -- return err; -+ return err; -+} - -- /* The BASET registers aren't cleared when writing -- * into them, force a reset if the interface is -- * running. -- */ -- if (netif_running(adapter->netdev)) -- schedule_work(&adapter->reset_task); -+int igc_tsn_offload_apply(struct igc_adapter *adapter) -+{ -+ int err; - -+ if (netif_running(adapter->netdev)) { -+ schedule_work(&adapter->reset_task); - return 0; - } - -- return igc_tsn_enable_offload(adapter); -+ err = igc_tsn_enable_offload(adapter); -+ if (err < 0) -+ return err; -+ -+ adapter->flags = igc_tsn_new_flags(adapter); -+ return 0; - } -diff --git a/drivers/net/ethernet/intel/igc/igc_tsn.h b/drivers/net/ethernet/intel/igc/igc_tsn.h -index f76bc86ddccd9..1512307f5a528 100644 ---- a/drivers/net/ethernet/intel/igc/igc_tsn.h -+++ b/drivers/net/ethernet/intel/igc/igc_tsn.h -@@ -5,5 +5,6 @@ - #define _IGC_TSN_H_ - - int igc_tsn_offload_apply(struct igc_adapter *adapter); -+int igc_tsn_reset(struct igc_adapter *adapter); - - #endif /* _IGC_BASE_H */ --- -2.39.5 - diff --git a/queue-5.10/igc-update-i226_k-device-id.patch b/queue-5.10/igc-update-i226_k-device-id.patch deleted file mode 100644 index 13f0d80c51..0000000000 --- a/queue-5.10/igc-update-i226_k-device-id.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 79cc8322b6d82747cb63ea464146c0bf5b5a6bc1 Mon Sep 17 00:00:00 2001 -From: Sasha Neftin -Date: Thu, 9 Sep 2021 20:49:04 +0300 -Subject: igc: Update I226_K device ID - -From: Sasha Neftin - -commit 79cc8322b6d82747cb63ea464146c0bf5b5a6bc1 upstream. - -The device ID for I226_K was incorrectly assigned, update the device -ID to the correct one. - -Fixes: bfa5e98c9de4 ("igc: Add new device ID") -Signed-off-by: Sasha Neftin -Tested-by: Nechama Kraus -Signed-off-by: Tony Nguyen -Signed-off-by: Greg Kroah-Hartman ---- - drivers/net/ethernet/intel/igc/igc_hw.h | 1 - - 1 file changed, 1 deletion(-) - ---- a/drivers/net/ethernet/intel/igc/igc_hw.h -+++ b/drivers/net/ethernet/intel/igc/igc_hw.h -@@ -24,7 +24,6 @@ - #define IGC_DEV_ID_I225_K2 0x3101 - #define IGC_DEV_ID_I226_K 0x3102 - #define IGC_DEV_ID_I225_LMVP 0x5502 --#define IGC_DEV_ID_I226_K 0x5504 - #define IGC_DEV_ID_I225_IT 0x0D9F - #define IGC_DEV_ID_I226_LM 0x125B - #define IGC_DEV_ID_I226_V 0x125C diff --git a/queue-5.10/series b/queue-5.10/series index 718327771e..347c40e394 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -91,10 +91,6 @@ drm-exynos-fimd-guard-display-clock-control-with-run.patch spi-spi-fsl-dspi-clear-completion-counter-before-ini.patch drm-i915-selftests-change-mock_request-to-return-err.patch drm-i915-gt-fix-timeline-left-held-on-vma-alloc-erro.patch -igc-add-new-device-id.patch -igc-simplify-tsn-flags-handling.patch -igc-remove-i226-qbv-basetime-restriction.patch -igc-disable-l1.2-pci-e-link-substate-to-avoid-perfor.patch lib-test_objagg-set-error-message-in-check_expect_hi.patch amd-xgbe-align-cl37-an-sequence-as-per-databook.patch enic-fix-incorrect-mtu-comparison-in-enic_change_mtu.patch @@ -184,5 +180,3 @@ rtc-lib_test-add-module_license.patch pwm-mediatek-ensure-to-disable-clocks-in-error-path.patch netlink-fix-rmem-check-in-netlink_broadcast_deliver.patch netlink-make-sure-we-allow-at-least-one-dump-skb.patch -igc-update-i226_k-device-id.patch -igc-allow-basetime-0-enrollment-for-qbv.patch