CPFL changes added to new CPFL device id for MMG.
rebased to next-net-intel-for-next-net and fixed conflict
and compiler issue.
changed macro name IDPF_DEVICE_ID_CPF to CPFL_DEV_ID_MEV

Signed-off-by: Venkatesh Vemula <[email protected]>
---
 .mailmap                             |  1 +
 drivers/net/intel/cpfl/cpfl_ethdev.c | 13 +++++++------
 drivers/net/intel/cpfl/cpfl_ethdev.h |  5 +++--
 3 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/.mailmap b/.mailmap
index 0dcd8fce3a..7c121cf5ba 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1665,6 +1665,7 @@ Venkata Suresh Kumar P <[email protected]>
 Venkat Duvvuru <[email protected]>
 Venkatesh Nuthula <[email protected]>
 Venkatesh Srinivas <[email protected]>
+Venkatesh Vemula <[email protected]>
 Venkateshwarlu Nalla <[email protected]>
 Venkat Koppula <[email protected]>
 Venkat Kumar Ande <[email protected]>
diff --git a/drivers/net/intel/cpfl/cpfl_ethdev.c 
b/drivers/net/intel/cpfl/cpfl_ethdev.c
index 110678e312..5fc1825391 100644
--- a/drivers/net/intel/cpfl/cpfl_ethdev.c
+++ b/drivers/net/intel/cpfl/cpfl_ethdev.c
@@ -1702,7 +1702,7 @@ cpfl_handle_vchnl_event_msg(struct cpfl_adapter_ext 
*adapter, uint8_t *msg, uint
        }
 
        /* ignore if it is ctrl vport */
-       if (adapter->base.hw.device_id == IDPF_DEV_ID_CPF &&
+       if (adapter->base.hw.device_id == CPFL_DEV_ID_MEV &&
                        adapter->ctrl_vport.base.vport_id == vc_event->vport_id)
                return;
 
@@ -2288,7 +2288,7 @@ cpfl_ctrl_path_close(struct cpfl_adapter_ext *adapter)
 {
        cpfl_stop_cfgqs(adapter);
        cpfl_remove_cfgqs(adapter);
-       if (adapter->base.hw.device_id == IDPF_DEV_ID_CPF)
+       if (adapter->base.hw.device_id == CPFL_DEV_ID_MEV)
                idpf_vc_vport_destroy(&adapter->ctrl_vport.base);
        else
                vcpf_del_queues(adapter);
@@ -2299,7 +2299,7 @@ cpfl_ctrl_path_open(struct cpfl_adapter_ext *adapter)
 {
        int ret;
 
-       if (adapter->base.hw.device_id == IDPF_DEV_ID_CPF) {
+       if (adapter->base.hw.device_id == CPFL_DEV_ID_MEV) {
                ret = cpfl_vc_create_ctrl_vport(adapter);
                if (ret) {
                        PMD_INIT_LOG(ERR, "Failed to create control vport");
@@ -2328,7 +2328,7 @@ cpfl_ctrl_path_open(struct cpfl_adapter_ext *adapter)
        ret = cpfl_cfgq_setup(adapter);
        if (ret) {
                PMD_INIT_LOG(ERR, "Failed to setup control queues");
-               if (adapter->base.hw.device_id == IDPF_DEV_ID_CPF)
+               if (adapter->base.hw.device_id == CPFL_DEV_ID_MEV)
                        goto err_cfgq_setup;
                else
                        goto err_del_cfg;
@@ -2354,7 +2354,7 @@ cpfl_ctrl_path_open(struct cpfl_adapter_ext *adapter)
        cpfl_remove_cfgqs(adapter);
 err_cfgq_setup:
 err_init_ctrl_vport:
-       if (adapter->base.hw.device_id == IDPF_DEV_ID_CPF)
+       if (adapter->base.hw.device_id == CPFL_DEV_ID_MEV)
                idpf_vc_vport_destroy(&adapter->ctrl_vport.base);
 err_del_cfg:
        vcpf_del_queues(adapter);
@@ -2868,7 +2868,8 @@ cpfl_dev_vport_init(struct rte_eth_dev *dev, void 
*init_params)
 }
 
 static const struct rte_pci_id pci_id_cpfl_map[] = {
-       { RTE_PCI_DEVICE(IDPF_INTEL_VENDOR_ID, IDPF_DEV_ID_CPF) },
+       { RTE_PCI_DEVICE(IDPF_INTEL_VENDOR_ID, CPFL_DEV_ID_MEV) },
+       { RTE_PCI_DEVICE(IDPF_INTEL_VENDOR_ID, CPFL_DEV_ID_MMG) },
        { .vendor_id = 0, /* sentinel */ },
 };
 
diff --git a/drivers/net/intel/cpfl/cpfl_ethdev.h 
b/drivers/net/intel/cpfl/cpfl_ethdev.h
index be73e05a0e..e05a0901d5 100644
--- a/drivers/net/intel/cpfl/cpfl_ethdev.h
+++ b/drivers/net/intel/cpfl/cpfl_ethdev.h
@@ -59,7 +59,8 @@
 #define CPFL_ALARM_INTERVAL    50000 /* us */
 
 /* Device IDs */
-#define IDPF_DEV_ID_CPF                        0x1453
+#define CPFL_DEV_ID_MMG                        0x11E0
+#define CPFL_DEV_ID_MEV                        0x1453
 #define VIRTCHNL2_QUEUE_GROUP_P2P      0x100
 
 #define CPFL_HOST_ID_NUM       2
@@ -339,7 +340,7 @@ cpfl_get_vsi_id(struct cpfl_itf *itf)
 
                return repr->vport_info->vport.info.vsi_id;
        } else if (itf->type == CPFL_ITF_TYPE_VPORT) {
-               if (itf->adapter->base.hw.device_id == IDPF_DEV_ID_CPF) {
+               if (itf->adapter->base.hw.device_id == CPFL_DEV_ID_MEV) {
                        vport_id = ((struct cpfl_vport *)itf)->base.vport_id;
 
                        vport_identity.func_type = CPCHNL2_FTYPE_LAN_PF;
-- 
2.34.1

Reply via email to