Commit 3c7bf5af2196 ("e1000e: Introduce private flag to disable K1")
implemented a workaround for packet loss issues when the K1 low-power link
state is enabled on the integrated LAN on several generations of platforms,
between Meteor Lake and Panther Lake. On Nova Lake platforms, it is not
needed, and may cause noticeable performance degradations.

Now that board_pch_nvp and e1000_pch_nvp are distinct types, add another
MAC type check in e1000_reconfigure_k1_params() so that it never applies
to MAC types before Meteor Lake or after Panther Lake.

Tested on an I219-V29 (8086:57ba), K1 enabled, 1 Gb/s link. For each test,
first line is the result without the patch, second line is with the patch.

  iperf3 TCP receive, 20 s runs:
      16-50 Mbps, 72-208 rx_crc_errors per run
      949 Mbps, 0 rx_crc_errors (5 of 5 runs)
  UDP 120 Mbps for 120 s, 2 runs:
      0.55-0.67 % lost, 1855-2651 rx_crc_errors
      0 % lost, 0 rx_crc_errors
  HTTPS download of a 4.3 GB and a 3.5 GB file:
      5.6 and 10.3 MB/s
      74 and 59 MB/s

Fixes: 3c7bf5af2196 ("e1000e: Introduce private flag to disable K1")
Signed-off-by: Dima Ruinskiy <[email protected]>
Co-developed-by: Michael Edri <[email protected]>
Signed-off-by: Michael Edri <[email protected]>
---
 drivers/net/ethernet/intel/e1000e/ich8lan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/e1000e/ich8lan.c 
b/drivers/net/ethernet/intel/e1000e/ich8lan.c
index a412475f5..f5f3867ad 100644
--- a/drivers/net/ethernet/intel/e1000e/ich8lan.c
+++ b/drivers/net/ethernet/intel/e1000e/ich8lan.c
@@ -301,7 +301,7 @@ static s32 e1000_reconfigure_k1_params(struct e1000_hw *hw)
        u32 fextnvm12;
        s32 ret_val;
 
-       if (hw->mac.type < e1000_pch_mtp) {
+       if (hw->mac.type < e1000_pch_mtp || hw->mac.type > e1000_pch_ptp) {
                if (hw->adapter->flags2 & FLAG2_DISABLE_K1)
                        return e1000_configure_k1_ich8lan(hw, false);
                return 0;
-- 
2.44.0

Reply via email to