e1000e: Introduce private flag to disable K1
Subsystems (2)
PATCH v2 1/1 e1000e: Introduce private flag to disable K1
The K1 state reduces power consumption on ICH family network controllers during idle periods, similarly to L1 state on PCI Express NICs. Therefore, it is recommended and enabled by default.
However, on some systems it has been observed to have adverse side effects, such as packet loss. It has been established through debug that the problem may be due to firmware misconfiguration of specific systems, interoperability with certain link partners, or marginal electrical conditions of specific units.
These problems typically cannot be fixed in the field, and generic workarounds to resolve the side effects on all systems, while keeping K1 enabled, were found infeasible.
Therefore, add the option for users to globally disable K1 idle state on the adapter.
Additionally, disable K1 by default for MTL and later platforms, due to issues reported with the current configuration.
---
v2: Add a missing semaphore acquiring and disable K1 on MTL by default
--- drivers/net/ethernet/intel/e1000e/e1000.h | 1 + drivers/net/ethernet/intel/e1000e/ethtool.c | 29 ++++++++++++++-- drivers/net/ethernet/intel/e1000e/hw.h | 1 + drivers/net/ethernet/intel/e1000e/ich8lan.c | 38 +++++++++++---------- drivers/net/ethernet/intel/e1000e/ich8lan.h | 2 ++ drivers/net/ethernet/intel/e1000e/netdev.c | 10 ++++++ 6 files changed, 60 insertions(+), 21 deletions(-)
drivers/net/ethernet/intel/e1000e/e1000.h +1 -0
@@ -461,6 +461,7 @@ s32 e1000e_get_base_timinca(struct e1000_adapter *adapter, u32 *timinca);#define FLAG2_CHECK_RX_HWTSTAMP BIT(13)#define FLAG2_CHECK_SYSTIM_OVERFLOW BIT(14)#define FLAG2_ENABLE_S0IX_FLOWS BIT(15) +#define FLAG2_DISABLE_K1 BIT(16)#define E1000_RX_DESC_PS (R , i) \ (&(((union e1000_rx_desc_packet_split *)((R).desc))[i]))
drivers/net/ethernet/intel/e1000e/ethtool.c +26 -3
@@ -26,6 +26,8 @@ struct e1000_stats {static const char e1000e_priv_flags_strings[][ETH_GSTRING_LEN ] = { #define E1000E_PRIV_FLAGS_S0IX_ENABLED BIT(0)"s0ix-enabled" , +#define E1000E_PRIV_FLAGS_DISABLE_K1 BIT(1) +"disable-k1" , };#define E1000E_PRIV_FLAGS_STR_LEN ARRAY_SIZE(e1000e_priv_flags_strings)
@@ -2297,23 +2299,44 @@ static u32 e1000e_get_priv_flags(struct net_device *netdev)if (adapter->flags2 &FLAG2_ENABLE_S0IX_FLOWS ) priv_flags |=E1000E_PRIV_FLAGS_S0IX_ENABLED ; +if (adapter->flags2 &FLAG2_DISABLE_K1 ) + priv_flags |=E1000E_PRIV_FLAGS_DISABLE_K1 ; +return priv_flags; }static int e1000e_set_priv_flags (struct net_device *netdev,u32 priv_flags) {struct e1000_adapter *adapter =netdev_priv (netdev); +struct e1000_hw *hw = &adapter->hw;unsigned int flags2 = adapter->flags2; - flags2 &= ~FLAG2_ENABLE_S0IX_FLOWS ; + flags2 &= ~(FLAG2_ENABLE_S0IX_FLOWS |FLAG2_DISABLE_K1 );if (priv_flags &E1000E_PRIV_FLAGS_S0IX_ENABLED ) { -struct e1000_hw *hw = &adapter->hw; -if (hw->mac.type < e1000_pch_cnp)return -EINVAL ; flags2 |=FLAG2_ENABLE_S0IX_FLOWS ; } +if (priv_flags &E1000E_PRIV_FLAGS_DISABLE_K1 ) { +if (hw->mac.type < e1000_ich8lan) +return -EINVAL ; + flags2 |=FLAG2_DISABLE_K1 ; +while (test_and_set_bit (__E1000_RESETTING, + &adapter->state)) +usleep_range (1000 ,2000 ); + +/* reset the link to apply the changes */ +if (netif_running (adapter->netdev)) { +e1000e_down (adapter, true); +e1000e_up (adapter); + }else { +e1000e_reset (adapter); + } + +clear_bit (__E1000_RESETTING, &adapter->state); + } +if (flags2 != adapter->flags2) adapter->flags2 = flags2;
drivers/net/ethernet/intel/e1000e/hw.h +1 -0
@@ -709,6 +709,7 @@ struct e1000_dev_spec_ich8lan {struct e1000_shadow_ram shadow_ram[E1000_ICH8_SHADOW_RAM_WORDS ];bool nvm_k1_enabled;bool eee_disable; +bool disable_k1;u16 eee_lp_ability;enum e1000_ulp_state ulp_state; };
drivers/net/ethernet/intel/e1000e/ich8lan.c +20 -18
@@ -286,21 +286,23 @@ static void e1000_toggle_lanphypc_pch_lpt(struct e1000_hw *hw) }/** -* e1000_reconfigure_k1_exit_timeout - reconfigure K1 exit timeout to -* align to MTP and later platform requirements. +* e1000_reconfigure_k1_params - reconfigure Kumeran K1 parameters. * @hw: pointer to the HW structure * * Context: PHY semaphore must be held by caller. * Return: 0 on success, negative on failure */ -static s32 e1000_reconfigure_k1_exit_timeout (struct e1000_hw *hw) +s32 e1000_reconfigure_k1_params (struct e1000_hw *hw) {u16 phy_timeout;u32 fextnvm12;s32 ret_val; -if (hw->mac.type < e1000_pch_mtp) +if (hw->mac.type < e1000_pch_mtp) { +if (hw->dev_spec.ich8lan.disable_k1) +return e1000_configure_k1_ich8lan (hw, false);return 0 ; + }/* Change Kumeran K1 power down state from P0s to P1 */ fextnvm12 =er32 (FEXTNVM12 );
@@ -310,6 +312,8 @@ static s32 e1000_reconfigure_k1_exit_timeout(struct e1000_hw *hw)/* Wait for the interface the settle */ usleep_range (1000 ,1100 ); +if (hw->dev_spec.ich8lan.disable_k1) +return e1000_configure_k1_ich8lan (hw, false);/* Change K1 exit timeout */ ret_val = e1e_rphy_locked(hw, I217_PHY_TIMEOUTS_REG,
@@ -373,8 +377,8 @@ static s32 e1000_init_phy_workarounds_pchlan(struct e1000_hw *hw)/* At this point the PHY might be inaccessible so don't * propagate the failure */ -if (e1000_reconfigure_k1_exit_timeout (hw)) -e_dbg ("Failed to reconfigure K1 exit timeout\n" ); +if (e1000_reconfigure_k1_params (hw)) +e_dbg ("Failed to reconfigure K1 parameters\n" ); fallthrough;case e1000_pch_lpt:
@@ -473,10 +477,10 @@ static s32 e1000_init_phy_workarounds_pchlan(struct e1000_hw *hw)if (hw->mac.type >= e1000_pch_mtp) { ret_val = hw->phy.ops.acquire (hw);if (ret_val) { -e_err ("Failed to reconfigure K1 exit timeout\n" ); +e_err ("Failed to reconfigure K1 parameters\n" ); goto out; } - ret_val =e1000_reconfigure_k1_exit_timeout (hw); + ret_val =e1000_reconfigure_k1_params (hw); hw->phy.ops.release (hw); } }
@@ -4948,17 +4952,15 @@ static s32 e1000_init_hw_ich8lan(struct e1000_hw *hw)u16 i;e1000_initialize_hw_bits_ich8lan (hw); -if (hw->mac.type >= e1000_pch_mtp) { - ret_val = hw->phy.ops.acquire (hw); -if (ret_val) -return ret_val; + ret_val = hw->phy.ops.acquire (hw); +if (ret_val) +return ret_val; - ret_val =e1000_reconfigure_k1_exit_timeout (hw); - hw->phy.ops.release (hw); -if (ret_val) { -e_dbg ("Error failed to reconfigure K1 exit timeout\n" ); -return ret_val; - } + ret_val =e1000_reconfigure_k1_params (hw); + hw->phy.ops.release (hw); +if (ret_val) { +e_dbg ("Error failed to reconfigure K1 parameters\n" ); +return ret_val; }/* Initialize identification LED */
drivers/net/ethernet/intel/e1000e/ich8lan.h +2 -0
@@ -310,4 +310,6 @@ s32 e1000_read_emi_reg_locked(struct e1000_hw *hw, u16 addr, u16 *data);s32 e1000_write_emi_reg_locked (struct e1000_hw *hw,u16 addr,u16 data);s32 e1000_set_eee_pchlan (struct e1000_hw *hw);s32 e1000_enable_ulp_lpt_lp (struct e1000_hw *hw,bool to_sx); +s32 e1000_reconfigure_k1_params (struct e1000_hw *hw); +#endif /* _E1000E_ICH8LAN_H_ */
drivers/net/ethernet/intel/e1000e/netdev.c +10 -0
@@ -5267,6 +5267,13 @@ static void e1000_watchdog_task(struct work_struct *work) &adapter->link_duplex);e1000_print_link_info (adapter); +if (adapter->flags2 &FLAG2_DISABLE_K1 ) { + hw->phy.ops.acquire (hw); + adapter->hw.dev_spec.ich8lan.disable_k1 = true; +e1000_reconfigure_k1_params (&adapter->hw); + hw->phy.ops.release (hw); + } +/* check if SmartSpeed worked */ e1000e_check_downshift (hw);if (phy->speed_downgraded)
@@ -7675,6 +7682,9 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)/* init PTP hardware clock */ e1000e_ptp_init (adapter); +if (hw->mac.type >= e1000_pch_mtp) + adapter->flags2 |=FLAG2_DISABLE_K1 ; +/* reset the hardware with the new settings */ e1000e_reset (adapter);
Signature · 1 line
2.34.1
Quoted 9 lines · On Thu, 21 Aug 2025 20:12:29 +0300 Vitaly Lifshits <[email protected]>…
The K1 state reduces power consumption on ICH family network controllers during idle periods, similarly to L1 state on PCI Express NICs. Therefore, it is recommended and enabled by default. However, on some systems it has been observed to have adverse side effects, such as packet loss. It has been established through debug that the problem may be due to firmware misconfiguration of specific systems, interoperability with certain link partners, or marginal electrical conditions of specific units.
Quoted 8 lines
These problems typically cannot be fixed in the field, and generic workarounds to resolve the side effects on all systems, while keeping K1 enabled, were found infeasible.
Therefore, add the option for users to globally disable K1 idle state on the adapter.Additionally, disable K1 by default for MTL and later platforms, due to issues reported with the current configuration.
Thanks for this!
See below for one potential issue.
Quoted 20 lines
Link:
https://lore.kernel.org/intel-wired-lan/CAMqyJG3LVqfgqMcTxeaPur_Jq0oQH7GgdxRuVtRX_6TTH2mX5Q@mail.gmail.com/
Link:
https://lore.kernel.org/intel-wired-lan/[email protected]/
Link:
https://lore.kernel.org/intel-wired-lan/Z_z9EjcKtwHCQcZR@mail-itl/https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2115393
Signed-off-by Vitaly Lifshits <[email protected]>---
static int e1000e_set_priv_flags(struct
net_device*netdev, u32priv_flags) {drivers/net/ethernet/intel/e1000e/ethtool.c +1
-1struct e1000_adapter *adapter =netdev_priv (netdev); +struct e1000_hw *hw = &adapter->hw;unsigned int flags2 = adapter->flags2; - flags2 &= ~FLAG2_ENABLE_S0IX_FLOWS ;
drivers/net/ethernet/intel/e1000e/ethtool.c static u32 e1000e_get_priv_flags(struct net_device *netdev) · line 2321
Quoted 10 lines
drivers/net/ethernet/intel/e1000e/ethtool.c +2
-2+ flags2 &= ~(FLAG2_ENABLE_S0IX_FLOWS |FLAG2_DISABLE_K1 );if (priv_flags &E1000E_PRIV_FLAGS_S0IX_ENABLED ) { -struct e1000_hw *hw = &adapter->hw; -if (hw->mac.type < e1000_pch_cnp)return -EINVAL ; flags2 |=FLAG2_ENABLE_S0IX_FLOWS ; } +if (priv_flags &E1000E_PRIV_FLAGS_DISABLE_K1 ) {
This is just checking if 'disable-k1' flag is set. But if I understand correctly the reset should be done if the 'disable-k1' flag state has changed?
Currently this would cause unnecessary reset if 's0ix-enabled' was changed when 'disable-k1' was already set and not changed. Also it incorrect would not trigger reset if 'disable-k1' was set, and adjusted to be not set.
Or did I miss something?
Quoted 21 lines
drivers/net/ethernet/intel/e1000e/ethtool.c +18
-0+if (hw->mac.type < e1000_ich8lan) +return -EINVAL ; + flags2 |=FLAG2_DISABLE_K1 ; +while (test_and_set_bit (__E1000_RESETTING, + &adapter->state)) +usleep_range (1000 ,2000 ); + +/* reset the link to apply the changes */ +if (netif_running (adapter->netdev)) { +e1000e_down (adapter, true); +e1000e_up (adapter); + }else { +e1000e_reset (adapter); + } + +clear_bit (__E1000_RESETTING, &adapter->state); + } +if (flags2 != adapter->flags2) adapter->flags2 = flags2;
Few more observations inline.
Quoted 51 lines · On Thu, 21 Aug 2025 20:12:29 +0300 Vitaly Lifshits <[email protected]>…
The K1 state reduces power consumption on ICH family network controllers during idle periods, similarly to L1 state on PCI Express NICs. Therefore, it is recommended and enabled by default. However, on some systems it has been observed to have adverse side effects, such as packet loss. It has been established through debug that the problem may be due to firmware misconfiguration of specific systems, interoperability with certain link partners, or marginal electrical conditions of specific units.
These problems typically cannot be fixed in the field, and generic workarounds to resolve the side effects on all systems, while keeping K1 enabled, were found infeasible.
Therefore, add the option for users to globally disable K1 idle state on the adapter.Additionally, disable K1 by default for MTL and later platforms, due to issues reported with the current configuration.
Link:
https://lore.kernel.org/intel-wired-lan/CAMqyJG3LVqfgqMcTxeaPur_Jq0oQH7GgdxRuVtRX_6TTH2mX5Q@mail.gmail.com/
Link:
https://lore.kernel.org/intel-wired-lan/[email protected]/
Link:
https://lore.kernel.org/intel-wired-lan/Z_z9EjcKtwHCQcZR@mail-itl/https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2115393
Signed-off-by Vitaly Lifshits <[email protected]>---
v2: Add a missing semaphore acquiring and disable K1 on MTL by default--- drivers/net/ethernet/intel/e1000e/e1000.h | 1 + drivers/net/ethernet/intel/e1000e/ethtool.c | 29 ++++++++++++++-- drivers/net/ethernet/intel/e1000e/hw.h | 1 + drivers/net/ethernet/intel/e1000e/ich8lan.c | 38 +++++++++++---------- drivers/net/ethernet/intel/e1000e/ich8lan.h | 2 ++ drivers/net/ethernet/intel/e1000e/netdev.c | 10 ++++++ 6 files changed, 60 insertions(+), 21 deletions(-)[snip]
a/drivers/net/ethernet/intel/e1000e/netdev.c+++b/drivers/net/ethernet/intel/e1000e/netdev.c@@ -5267,6 +5267,13 @@ static voide1000_watchdog_task(struct work_struct *work)&adapter->link_duplex);e1000_print_link_info(adapter);drivers/net/ethernet/intel/e1000e/netdev.c +3
-0+if (adapter->flags2 &FLAG2_DISABLE_K1 ) { + hw->phy.ops.acquire (hw); +
adapter->hw.dev_spec.ich8lan.disable_k1= true;
+e1000_reconfigure_k1_params(&adapter->hw);
drivers/net/ethernet/intel/e1000e/netdev.c static void e1000_watchdog_task(struct work_struct *work) · line 5276
Quoted 3 lines
drivers/net/ethernet/intel/e1000e/netdev.c +3
-0+ hw->phy.ops.release (hw); + } +
This also seems to now calling on every whatdog run the k1-params again and again if FLAG2_DISABLE_K1 is set. Is this intended? I suspect this should also change id disable_k1 != flags2 & FLAG2_DISABLE_K1.
drivers/net/ethernet/intel/e1000e/netdev.c static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent) · line 7687
Quoted 10 lines
drivers/net/ethernet/intel/e1000e/netdev.c +0
-0/* check if SmartSpeed worked */ e1000e_check_downshift (hw);if (phy->speed_downgraded)@@ -7675,6 +7682,9 @@ static int e1000_probe(struct pci_dev *pdev,const struct
pci_device_id*ent) /* init PTP hardware clock */drivers/net/ethernet/intel/e1000e/netdev.c +3
-0e1000e_ptp_init (adapter); +if (hw->mac.type >= e1000_pch_mtp) + adapter->flags2 |=FLAG2_DISABLE_K1 ; +
Is this sufficient? The
Quoted 3 lines
drivers/net/ethernet/intel/e1000e/netdev.c +0
-0/* reset the hardware with the new settings */ e1000e_reset (adapter);
Sorry for accidental sending this before finished. Comments amended.
Quoted 50 lines · On Fri, 22 Aug 2025 00:01:09 +0300 Timo Teras <[email protected]> wrote:
Few more observations inline.
Quoted 45 lines · On Thu, 21 Aug 2025 20:12:29 +0300 Vitaly Lifshits <[email protected]>…
The K1 state reduces power consumption on ICH family network controllers during idle periods, similarly to L1 state on PCI Express NICs. Therefore, it is recommended and enabled by default. However, on some systems it has been observed to have adverse side effects, such as packet loss. It has been established through debug that the problem may be due to firmware misconfiguration of specific systems, interoperability with certain link partners, or marginal electrical conditions of specific units.
These problems typically cannot be fixed in the field, and generic workarounds to resolve the side effects on all systems, while keeping K1 enabled, were found infeasible.
Therefore, add the option for users to globally disable K1 idle state on the adapter.Additionally, disable K1 by default for MTL and later platforms, due to issues reported with the current configuration.
Link:
https://lore.kernel.org/intel-wired-lan/CAMqyJG3LVqfgqMcTxeaPur_Jq0oQH7GgdxRuVtRX_6TTH2mX5Q@mail.gmail.com/
Link:
https://lore.kernel.org/intel-wired-lan/[email protected]/
Link:
https://lore.kernel.org/intel-wired-lan/Z_z9EjcKtwHCQcZR@mail-itl/https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2115393
Signed-off-by Vitaly Lifshits <[email protected]>---
v2: Add a missing semaphore acquiring and disable K1 on MTL by default ---drivers/net/ethernet/intel/e1000e/e1000.h | 1 + drivers/net/ethernet/intel/e1000e/ethtool.c | 29 ++++++++++++++-- drivers/net/ethernet/intel/e1000e/hw.h | 1 + drivers/net/ethernet/intel/e1000e/ich8lan.c | 38 +++++++++++---------- drivers/net/ethernet/intel/e1000e/ich8lan.h | 2 ++ drivers/net/ethernet/intel/e1000e/netdev.c | 10 ++++++ 6 files changed, 60 insertions(+), 21 deletions(-)[snip]
a/drivers/net/ethernet/intel/e1000e/netdev.c+++b/drivers/net/ethernet/intel/e1000e/netdev.c@@ -5267,6 +5267,13 @@ static voide1000_watchdog_task(struct work_struct *work)&adapter->link_duplex);e1000_print_link_info(adapter);
Quoted 14 lines
drivers/net/ethernet/intel/e1000e/netdev.c static void e1000_watchdog_task(struct work_struct *work) · line 5276
Quoted 9 lines
drivers/net/ethernet/intel/e1000e/netdev.c +3
-0+if (adapter->flags2 &FLAG2_DISABLE_K1 ) { + hw->phy.ops.acquire (hw); +
adapter->hw.dev_spec.ich8lan.disable_k1= true;
+e1000_reconfigure_k1_params(&adapter->hw);drivers/net/ethernet/intel/e1000e/netdev.c +3
-0+ hw->phy.ops.release (hw); + } +This also seems to now calling on every whatdog run the k1-params again and again if
FLAG2_DISABLE_K1is set. Is this intended? I suspect this should also change iddisable_k1!= flags2 &FLAG2_DISABLE_K1.
Also disable_k1 is never set to false.
Does this mean that if disable-k1 was enabled, but later disabled. Things don't work as the rest of the code paths check disable_k1 which does not get updated.
Quoted 7 lines
Quoted 7 lines
drivers/net/ethernet/intel/e1000e/netdev.c +0
-0/* check if SmartSpeed worked */ e1000e_check_downshift (hw);if (phy->speed_downgraded)@@ -7675,6 +7682,9 @@ static int e1000_probe(struct pci_dev *pdev,const struct
pci_device_id*ent) /* init PTP hardware clock */
e1000e_ptp_init(adapter);
Quoted 5 lines
drivers/net/ethernet/intel/e1000e/netdev.c static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent) · line 7687
Quoted 3 lines
drivers/net/ethernet/intel/e1000e/netdev.c +3
-0+if (hw->mac.type >= e1000_pch_mtp) + adapter->flags2 |=FLAG2_DISABLE_K1 ; +Is this sufficient?
This was intended here because the flags2 does not propagate to ich8lan.disable_k1 until the watch dog executes with the link up.
Thus most of the checks for disable_k1 do nothing until the link goes up. Is this the intended behaviour?
Quoted 4 lines
Quoted 3 lines
drivers/net/ethernet/intel/e1000e/netdev.c +0
-0/* reset the hardware with the new settings */ e1000e_reset (adapter);
Quoted 90 lines · Timo Teras
Sorry for accidental sending this before finished. Comments amended.
Quoted 50 lines · On Fri, 22 Aug 2025 00:01:09 +0300 Timo Teras <[email protected]> wrote:
Few more observations inline.
Quoted 45 lines · On Thu, 21 Aug 2025 20:12:29 +0300 Vitaly Lifshits <[email protected]>…
The K1 state reduces power consumption on ICH family network controllers during idle periods, similarly to L1 state on PCI Express NICs. Therefore, it is recommended and enabled by default. However, on some systems it has been observed to have adverse side effects, such as packet loss. It has been established through debug that the problem may be due to firmware misconfiguration of specific systems, interoperability with certain link partners, or marginal electrical conditions of specific units.
These problems typically cannot be fixed in the field, and generic workarounds to resolve the side effects on all systems, while keeping K1 enabled, were found infeasible.
Therefore, add the option for users to globally disable K1 idle state on the adapter.Additionally, disable K1 by default for MTL and later platforms, due to issues reported with the current configuration.
Link:
https://lore.kernel.org/intel-wired-lan/CAMqyJG3LVqfgqMcTxeaPur_Jq0oQH7GgdxRuVtRX_6TTH2mX5Q@mail.gmail.com/
Link:
https://lore.kernel.org/intel-wired-lan/[email protected]/
Link:
https://lore.kernel.org/intel-wired-lan/Z_z9EjcKtwHCQcZR@mail-itl/https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2115393
Signed-off-by Vitaly Lifshits <[email protected]>---
v2: Add a missing semaphore acquiring and disable K1 on MTL by default ---drivers/net/ethernet/intel/e1000e/e1000.h | 1 + drivers/net/ethernet/intel/e1000e/ethtool.c | 29 ++++++++++++++-- drivers/net/ethernet/intel/e1000e/hw.h | 1 + drivers/net/ethernet/intel/e1000e/ich8lan.c | 38 +++++++++++---------- drivers/net/ethernet/intel/e1000e/ich8lan.h | 2 ++ drivers/net/ethernet/intel/e1000e/netdev.c | 10 ++++++ 6 files changed, 60 insertions(+), 21 deletions(-)[snip]
a/drivers/net/ethernet/intel/e1000e/netdev.c+++b/drivers/net/ethernet/intel/e1000e/netdev.c@@ -5267,6 +5267,13 @@ static voide1000_watchdog_task(struct work_struct *work)&adapter->link_duplex);e1000_print_link_info(adapter);Quoted 14 lines
drivers/net/ethernet/intel/e1000e/netdev.c static void e1000_watchdog_task(struct work_struct *work) · line 5276
Quoted 9 lines
drivers/net/ethernet/intel/e1000e/netdev.c +3
-0+if (adapter->flags2 &FLAG2_DISABLE_K1 ) { + hw->phy.ops.acquire (hw); +
adapter->hw.dev_spec.ich8lan.disable_k1= true;
+e1000_reconfigure_k1_params(&adapter->hw);drivers/net/ethernet/intel/e1000e/netdev.c +3
-0+ hw->phy.ops.release (hw); + } +This also seems to now calling on every whatdog run the k1-params again and again if
FLAG2_DISABLE_K1is set. Is this intended? I suspect this should also change iddisable_k1!= flags2 &FLAG2_DISABLE_K1.Also
disable_k1is never set to false.Does this mean that if disable-k1 was enabled, but later disabled. Things don't work as the rest of the code paths check
disable_k1which does not get updated.Quoted 7 lines
Quoted 7 lines
/* check if SmartSpeed worked */ e1000e_check_downshift(hw); if (phy->speed_downgraded)(quoted diff) +0
-0@@ -7675,6 +7682,9 @@ static int e1000_probe(struct pci_dev *pdev,const struct
pci_device_id*ent) /* init PTP hardware clock */
e1000e_ptp_init(adapter);Quoted 5 lines
drivers/net/ethernet/intel/e1000e/netdev.c static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent) · line 7687
Quoted 3 lines
drivers/net/ethernet/intel/e1000e/netdev.c +3
-0+if (hw->mac.type >= e1000_pch_mtp) + adapter->flags2 |=FLAG2_DISABLE_K1 ; +Is this sufficient?
Quoted 11 lines
This was intended here because the flags2 does not propagate to ich8lan.disable_k1 until the watch dog executes with the link up.
Thus most of the checks for
disable_k1do nothing until the link goes up. Is this the intended behaviour?Quoted 4 lines
Quoted 3 lines
/* reset the hardware with the new settings */
e1000e_reset(adapter);
Hi Timo,
Thank you again for reviewing this patch.
You raised great points, so I revisited the code and made a few changes that I'll send in v3, these will address your concerns.