Dear Vitaly,

Am 25.01.26 um 11:36 schrieb Vitaly Lifshits:
Commit 3c7bf5af21960 ("e1000e: Introduce private flag to disable K1")
disabled K1 by default on Meteor Lake and newer systems due to packet
loss observed on various platforms. However, disabling K1 caused an
increase in power consumption.

To mitigate this, reconfigure the PLL clock gate value so that K1 can
remain enabled without incurring the additional power consumption.

Please add how to measure the power consumption, and add the value before and after your change.

Also, please add how to check that K1 is enabled.

Signed-off-by: Vitaly Lifshits <[email protected]>
Fixes: 3c7bf5af21960 ("e1000e: Introduce private flag to disable K1")

The tags could be swapped.

---
  drivers/net/ethernet/intel/e1000e/ich8lan.c | 3 +++
  drivers/net/ethernet/intel/e1000e/netdev.c  | 3 ---
  2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/intel/e1000e/ich8lan.c 
b/drivers/net/ethernet/intel/e1000e/ich8lan.c
index 13841daba399..4b42b28354d0 100644
--- a/drivers/net/ethernet/intel/e1000e/ich8lan.c
+++ b/drivers/net/ethernet/intel/e1000e/ich8lan.c
@@ -1594,6 +1594,9 @@ static s32 e1000_check_for_copper_link_ich8lan(struct 
e1000_hw *hw)
                        phy_reg &= ~I217_PLL_CLOCK_GATE_MASK;
                        if (speed == SPEED_100 || speed == SPEED_10)
                                phy_reg |= 0x3E8;
+                       else if (hw->mac.type == e1000_pch_mtp ||
+                                hw->mac.type == e1000_pch_ptp)
+                               phy_reg |= 0x1D5;

Please add a comment, what this magical value does. (Yes, it should have been added for the other lines too in the other places.)

                        else
                                phy_reg |= 0xFA;
                        e1e_wphy_locked(hw, I217_PLL_CLOCK_GATE_REG, phy_reg);
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c 
b/drivers/net/ethernet/intel/e1000e/netdev.c
index 82d1d5fe51d5..8f0eb822610b 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -7755,9 +7755,6 @@ 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);

Reviewed-by: Paul Menzel <[email protected]>


Kind regards,

Paul

Reply via email to