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.

Fixes: 1fe4f45ea461 ("e1000e: Add support for the next LOM generation")
Signed-off-by: Dima Ruinskiy <[email protected]>
---
 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(-)

diff --git a/drivers/net/ethernet/intel/e1000e/e1000.h 
b/drivers/net/ethernet/intel/e1000e/e1000.h
index 704284188..b662ff2b7 100644
--- a/drivers/net/ethernet/intel/e1000e/e1000.h
+++ b/drivers/net/ethernet/intel/e1000e/e1000.h
@@ -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);
diff --git a/drivers/net/ethernet/intel/e1000e/hw.h 
b/drivers/net/ethernet/intel/e1000e/hw.h
index c7ac599e5..259b5fb8d 100644
--- a/drivers/net/ethernet/intel/e1000e/hw.h
+++ b/drivers/net/ethernet/intel/e1000e/hw.h
@@ -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
 
diff --git a/drivers/net/ethernet/intel/e1000e/ich8lan.c 
b/drivers/net/ethernet/intel/e1000e/ich8lan.c
index 87cd1cdc6..a412475f5 100644
--- a/drivers/net/ethernet/intel/e1000e/ich8lan.c
+++ b/drivers/net/ethernet/intel/e1000e/ich8lan.c
@@ -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,
+};
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c 
b/drivers/net/ethernet/intel/e1000e/netdev.c
index c3e944ee4..13c26144f 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -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 */
-- 
2.44.0

Reply via email to