e1000e: Remove unnecessary workarounds from Nova Lake platform
Subsystems (2)
v2 cover e1000e: Remove unnecessary workarounds from Nova Lake platform
Introduce a dedicated Nova Lake board type and associate its device IDs with the correct MAC type. Then restrict the K1 workaround to Meteor Lake through Panther Lake, excluding Nova Lake where it is unnecessary and can degrade performance.
Changes in v2:
- Corrected Fixes: tag in patch 2
Dima Ruinskiy (2):
e1000e: introduce new board type for Nova Lake PCH
e1000e: remove K1 workaround from Nova Lake
drivers/net/ethernet/intel/e1000e/e1000.h | 4 +++- drivers/net/ethernet/intel/e1000e/hw.h | 4 ++-- drivers/net/ethernet/intel/e1000e/ich8lan.c | 22 ++++++++++++++++++++- drivers/net/ethernet/intel/e1000e/netdev.c | 17 ++++++++-------- 4 files changed, 35 insertions(+), 12 deletions(-)
Signature · 1 line
2.44.0
PATCH v2 1/2 e1000e: introduce new board type for Nova Lake PCH
Commit 1fe4f45ea461 ("e1000e: Add support for the next LOM generation") introduced the e1000_pch_nvp MAC type and related device IDs. However, without a new board type, the device IDs were not associated with the correct MAC type.
Fix this by introducing a new board type, to distinguish between Nova Lake and previous generations of LAN devices. This allows limiting specific configuration flows to their respective device families. For example - the PHY access retry workaround, the PLL clock gate timeout change and the forced 38400KHz system clock (SYSCFI).
Additionally, remap device IDs 0x5510 and 0x5511 to the new board type. These IDs were originally reserved to Lunar Lake LAN, but never used in the field and reallocated to Nova Lake platforms.
--- drivers/net/ethernet/intel/e1000e/e1000.h | 4 +++- drivers/net/ethernet/intel/e1000e/hw.h | 4 ++-- drivers/net/ethernet/intel/e1000e/ich8lan.c | 20 ++++++++++++++++++++ drivers/net/ethernet/intel/e1000e/netdev.c | 17 +++++++++-------- 4 files changed, 34 insertions(+), 11 deletions(-)
drivers/net/ethernet/intel/e1000e/e1000.h +3 -1
@@ -118,7 +118,8 @@ enum e1000_boards { board_pch_tgp, board_pch_adp, board_pch_mtp, - board_pch_ptp + board_pch_ptp, + board_pch_nvp }; struct e1000_ps_page {
@@ -530,6 +531,7 @@ extern const struct e1000_info e1000_pch_tgp_info;extern const struct e1000_info e1000_pch_adp_info;extern const struct e1000_info e1000_pch_mtp_info;extern const struct e1000_info e1000_pch_ptp_info; +extern const struct e1000_info e1000_pch_nvp_info;extern const struct e1000_info e1000_es2_info;void e1000e_ptp_init (struct e1000_adapter *adapter);
drivers/net/ethernet/intel/e1000e/hw.h +2 -2
@@ -112,14 +112,14 @@ struct e1000_hw;#define E1000_DEV_ID_PCH_ADP_I219_V19 0x550D#define E1000_DEV_ID_PCH_LNP_I219_LM20 0x550E#define E1000_DEV_ID_PCH_LNP_I219_V20 0x550F -#define E1000_DEV_ID_PCH_LNP_I219_LM21 0x5510 -#define E1000_DEV_ID_PCH_LNP_I219_V21 0x5511#define E1000_DEV_ID_PCH_ARL_I219_LM24 0x57A0#define E1000_DEV_ID_PCH_ARL_I219_V24 0x57A1#define E1000_DEV_ID_PCH_PTP_I219_LM25 0x57B3#define E1000_DEV_ID_PCH_PTP_I219_V25 0x57B4#define E1000_DEV_ID_PCH_PTP_I219_LM27 0x57B7#define E1000_DEV_ID_PCH_PTP_I219_V27 0x57B8 +#define E1000_DEV_ID_PCH_NVL_I219_LM28 0x5510 +#define E1000_DEV_ID_PCH_NVL_I219_V28 0x5511#define E1000_DEV_ID_PCH_NVL_I219_LM29 0x57B9#define E1000_DEV_ID_PCH_NVL_I219_V29 0x57BA
drivers/net/ethernet/intel/e1000e/ich8lan.c +20 -0
@@ -6240,3 +6240,23 @@ const struct e1000_info e1000_pch_ptp_info = { .phy_ops = &ich8_phy_ops, .nvm_ops = &spt_nvm_ops, }; + +const struct e1000_info e1000_pch_nvp_info = { + .mac = e1000_pch_nvp, + .flags =FLAG_IS_ICH + |FLAG_HAS_WOL + |FLAG_HAS_HW_TIMESTAMP + |FLAG_HAS_CTRLEXT_ON_LOAD + |FLAG_HAS_AMT + |FLAG_HAS_FLASH + |FLAG_HAS_JUMBO_FRAMES + |FLAG_APME_IN_WUC , + .flags2 =FLAG2_HAS_PHY_STATS + |FLAG2_HAS_EEE , + .pba =26 , + .max_hw_frame_size =9022 , + .get_variants = e1000_get_variants_ich8lan, + .mac_ops = &ich8_mac_ops, + .phy_ops = &ich8_phy_ops, + .nvm_ops = &spt_nvm_ops, +};
drivers/net/ethernet/intel/e1000e/netdev.c +9 -8
@@ -57,6 +57,7 @@ static const struct e1000_info *e1000_info_tbl[] = { [board_pch_adp] = &e1000_pch_adp_info, [board_pch_mtp] = &e1000_pch_mtp_info, [board_pch_ptp] = &e1000_pch_ptp_info, + [board_pch_nvp] = &e1000_pch_nvp_info, };static const struct dmi_system_id disable_k1_list[] = {
@@ -8196,12 +8197,6 @@ static const struct pci_device_id e1000_pci_tbl[] = { }, { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_LNP_I219_V20), .driver_data = board_pch_mtp, - }, { -PCI_VDEVICE (INTEL ,E1000_DEV_ID_PCH_LNP_I219_LM21 ), - .driver_data = board_pch_mtp, - }, { -PCI_VDEVICE (INTEL ,E1000_DEV_ID_PCH_LNP_I219_V21 ), - .driver_data = board_pch_mtp, }, {PCI_VDEVICE (INTEL ,E1000_DEV_ID_PCH_ARL_I219_LM24 ), .driver_data = board_pch_mtp,
@@ -8220,12 +8215,18 @@ static const struct pci_device_id e1000_pci_tbl[] = { }, { PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_PTP_I219_V27), .driver_data = board_pch_ptp, + }, { +PCI_VDEVICE (INTEL ,E1000_DEV_ID_PCH_NVL_I219_LM28 ), + .driver_data = board_pch_nvp, + }, { +PCI_VDEVICE (INTEL ,E1000_DEV_ID_PCH_NVL_I219_V28 ), + .driver_data = board_pch_nvp, }, {PCI_VDEVICE (INTEL ,E1000_DEV_ID_PCH_NVL_I219_LM29 ), - .driver_data = board_pch_ptp, + .driver_data = board_pch_nvp, }, {PCI_VDEVICE (INTEL ,E1000_DEV_ID_PCH_NVL_I219_V29 ), - .driver_data = board_pch_ptp + .driver_data = board_pch_nvp }, { } /* terminate list */
Signature · 1 line
2.44.0
PATCH v2 2/2 e1000e: remove K1 workaround from Nova Lake
In reply to Dima RuinskiyCommit efaaf344bc29 ("e1000e: change k1 configuration on MTP and later platforms") implemented a workaround for packet loss issues when the K1 low-power link state is enabled on the integrated LAN on several platform generations, 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--- drivers/net/ethernet/intel/e1000e/ich8lan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/e1000e/ich8lan.c +1 -1
@@ -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 ;
Signature · 1 line
2.44.0