On Mon, 8 Sep 2025 11:05:52 +0300 Vitaly Lifshits <[email protected]> wrote:
> 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_6tth2m...@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/ > Link: https://github.com/QubesOS/qubes-issues/issues/9896 > Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2115393 > > Signed-off-by: Vitaly Lifshits <[email protected]> > --- > v3: Removed disabling K1 in watchdog_task and change the private flag setting > 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 | 45 ++++++++++++++++++--- > drivers/net/ethernet/intel/e1000e/ich8lan.c | 41 ++++++++++--------- > drivers/net/ethernet/intel/e1000e/ich8lan.h | 2 + > drivers/net/ethernet/intel/e1000e/netdev.c | 3 ++ > 5 files changed, 69 insertions(+), 23 deletions(-) > >[snip] > diff --git a/drivers/net/ethernet/intel/e1000e/ich8lan.c > b/drivers/net/ethernet/intel/e1000e/ich8lan.c > index df4e7d781cb1..a164431cdfe2 100644 > --- a/drivers/net/ethernet/intel/e1000e/ich8lan.c > +++ b/drivers/net/ethernet/intel/e1000e/ich8lan.c > @@ -286,21 +286,26 @@ 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 > * > + * By default K1 is enabled after MAC reset, so this function only > + * disables it. > + * > * 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) I believe this function is no longer used outside this compilation unit in the v3. So this could be left 'static' now. > { > u16 phy_timeout; > u32 fextnvm12; > s32 ret_val; > > - if (hw->mac.type < e1000_pch_mtp) > + if (hw->mac.type < e1000_pch_mtp) { > + if (hw->adapter->flags2 & FLAG2_DISABLE_K1) > + return e1000_configure_k1_ich8lan(hw, false); > return 0; > + } > > /* Change Kumeran K1 power down state from P0s to P1 */ > fextnvm12 = er32(FEXTNVM12); > diff --git a/drivers/net/ethernet/intel/e1000e/ich8lan.h > b/drivers/net/ethernet/intel/e1000e/ich8lan.h > index 5feb589a9b5f..97ceb6fa763b 100644 > --- a/drivers/net/ethernet/intel/e1000e/ich8lan.h > +++ b/drivers/net/ethernet/intel/e1000e/ich8lan.h > @@ -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); > + And this hunk can be removed. > #endif /* _E1000E_ICH8LAN_H_ */ I also tested against regression on my affected machine and this indeed fixes the issues. (I did not get to test the ethtool flag functionality.) Once the above minor issue is resolved, you can add: Reviewed-by: Timo Teräs <[email protected]> Tested-by: Timo Teräs <[email protected]>
