From: Dima Ruinskiy <[email protected]>

Add a new `e1000_pch_nvp` MAC type and move the existing NVL device IDs
from `e1000_pch_ptp` to it. The new MAC type takes the same code paths as
`e1000_pch_ptp` in both the base code and the em PMD.

Signed-off-by: Dima Ruinskiy <[email protected]>
Signed-off-by: Anatoly Burakov <[email protected]>
---
 drivers/net/intel/e1000/base/e1000_api.c     | 5 ++++-
 drivers/net/intel/e1000/base/e1000_hw.h      | 1 +
 drivers/net/intel/e1000/base/e1000_ich8lan.c | 7 +++++++
 drivers/net/intel/e1000/em_ethdev.c          | 5 ++++-
 4 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/drivers/net/intel/e1000/base/e1000_api.c 
b/drivers/net/intel/e1000/base/e1000_api.c
index 83b3d6c439..19ba8b575b 100644
--- a/drivers/net/intel/e1000/base/e1000_api.c
+++ b/drivers/net/intel/e1000/base/e1000_api.c
@@ -328,9 +328,11 @@ s32 e1000_set_mac_type(struct e1000_hw *hw)
        case E1000_DEV_ID_PCH_PTP_I219_V25:
        case E1000_DEV_ID_PCH_WCL_I219_LM27:
        case E1000_DEV_ID_PCH_WCL_I219_V27:
+               mac->type = e1000_pch_ptp;
+               break;
        case E1000_DEV_ID_PCH_NVL_I219_LM29:
        case E1000_DEV_ID_PCH_NVL_I219_V29:
-               mac->type = e1000_pch_ptp;
+               mac->type = e1000_pch_nvp;
                break;
        case E1000_DEV_ID_82575EB_COPPER:
        case E1000_DEV_ID_82575EB_FIBER_SERDES:
@@ -505,6 +507,7 @@ s32 e1000_setup_init_funcs(struct e1000_hw *hw, bool 
init_device)
        case e1000_pch_tgp:
        case e1000_pch_mtp:
        case e1000_pch_ptp:
+       case e1000_pch_nvp:
                e1000_init_function_pointers_ich8lan(hw);
                break;
        case e1000_82575:
diff --git a/drivers/net/intel/e1000/base/e1000_hw.h 
b/drivers/net/intel/e1000/base/e1000_hw.h
index 99c2195916..335a018776 100644
--- a/drivers/net/intel/e1000/base/e1000_hw.h
+++ b/drivers/net/intel/e1000/base/e1000_hw.h
@@ -265,6 +265,7 @@ enum e1000_mac_type {
        e1000_pch_adp,
        e1000_pch_mtp,
        e1000_pch_ptp,
+       e1000_pch_nvp,
        e1000_pch_tgp,
        e1000_82575,
        e1000_82576,
diff --git a/drivers/net/intel/e1000/base/e1000_ich8lan.c 
b/drivers/net/intel/e1000/base/e1000_ich8lan.c
index 0290a7dcb4..b020639563 100644
--- a/drivers/net/intel/e1000/base/e1000_ich8lan.c
+++ b/drivers/net/intel/e1000/base/e1000_ich8lan.c
@@ -372,6 +372,7 @@ STATIC s32 e1000_init_phy_workarounds_pchlan(struct 
e1000_hw *hw)
        case e1000_pch_adp:
        case e1000_pch_mtp:
        case e1000_pch_ptp:
+       case e1000_pch_nvp:
                /* Due to clock synchronization issue on MTL and above prior to
                 * disabling k1 it is required to disable P0s state and
                 * reconfigure PHY k1 exit timeout. At this point the PHY might
@@ -549,6 +550,7 @@ STATIC s32 e1000_init_phy_params_pchlan(struct e1000_hw *hw)
                case e1000_pch_adp:
                case e1000_pch_mtp:
                case e1000_pch_ptp:
+               case e1000_pch_nvp:
                        /* In case the PHY needs to be in mdio slow mode,
                         * set slow mode and try to get the PHY id again.
                         */
@@ -856,6 +858,7 @@ STATIC s32 e1000_init_mac_params_ich8lan(struct e1000_hw 
*hw)
        case e1000_pch_adp:
        case e1000_pch_mtp:
        case e1000_pch_ptp:
+       case e1000_pch_nvp:
                /* multicast address update for pch2 */
                mac->ops.update_mc_addr_list =
                        e1000_update_mc_addr_list_pch2lan;
@@ -1866,6 +1869,7 @@ void e1000_init_function_pointers_ich8lan(struct e1000_hw 
*hw)
        case e1000_pch_adp:
        case e1000_pch_mtp:
        case e1000_pch_ptp:
+       case e1000_pch_nvp:
                hw->phy.ops.init_params = e1000_init_phy_params_pchlan;
                break;
        default:
@@ -2335,6 +2339,7 @@ STATIC s32 e1000_sw_lcd_config_ich8lan(struct e1000_hw 
*hw)
        case e1000_pch_adp:
        case e1000_pch_mtp:
        case e1000_pch_ptp:
+       case e1000_pch_nvp:
                sw_cfg_mask = E1000_FEXTNVM_SW_CONFIG_ICH8M;
                break;
        default:
@@ -3461,6 +3466,7 @@ STATIC s32 e1000_valid_nvm_bank_detect_ich8lan(struct 
e1000_hw *hw, u32 *bank)
        case e1000_pch_adp:
        case e1000_pch_mtp:
        case e1000_pch_ptp:
+       case e1000_pch_nvp:
                bank1_offset = nvm->flash_bank_size;
                act_offset = E1000_ICH_NVM_SIG_WORD;
 
@@ -4436,6 +4442,7 @@ STATIC s32 e1000_validate_nvm_checksum_ich8lan(struct 
e1000_hw *hw)
        case e1000_pch_adp:
        case e1000_pch_mtp:
        case e1000_pch_ptp:
+       case e1000_pch_nvp:
                word = NVM_COMPAT;
                valid_csum_mask = NVM_COMPAT_VALID_CSUM;
                break;
diff --git a/drivers/net/intel/e1000/em_ethdev.c 
b/drivers/net/intel/e1000/em_ethdev.c
index c02d09e500..be830881db 100644
--- a/drivers/net/intel/e1000/em_ethdev.c
+++ b/drivers/net/intel/e1000/em_ethdev.c
@@ -593,6 +593,7 @@ em_set_pba(struct e1000_hw *hw)
                case e1000_pch_tgp:
                case e1000_pch_mtp:
                case e1000_pch_ptp:
+               case e1000_pch_nvp:
                        pba = E1000_PBA_26K;
                        break;
                default:
@@ -983,7 +984,8 @@ em_hardware_init(struct e1000_hw *hw)
                   hw->mac.type == e1000_pch_adp ||
                   hw->mac.type == e1000_pch_tgp ||
                   hw->mac.type == e1000_pch_mtp ||
-                  hw->mac.type == e1000_pch_ptp) {
+                  hw->mac.type == e1000_pch_ptp ||
+                  hw->mac.type == e1000_pch_nvp) {
                hw->fc.requested_mode = e1000_fc_full;
        }
 
@@ -1177,6 +1179,7 @@ em_get_max_pktlen(struct rte_eth_dev *dev)
        case e1000_pch_tgp:
        case e1000_pch_mtp:
        case e1000_pch_ptp:
+       case e1000_pch_nvp:
        case e1000_82574:
        case e1000_80003es2lan: /* 9K Jumbo Frame size */
        case e1000_82583:
-- 
2.52.0

Reply via email to