From 9924dfd601fadeacb6c9968437cad8c6f853f77f Mon Sep 17 00:00:00 2001 From: Kalesh AP Date: Thu, 10 Oct 2019 15:14:32 +0530 Subject: [PATCH] net/bnxt: move macro definitions to header file Move device and vendor ids macro definition from bnxt_ethdev.c to bnxt.h. There is no functionality impact. Fixes: 882aa9c6e2e1 ("net/bnxt: move PCI device ids to the driver") Cc: stable@dpdk.org Signed-off-by: Kalesh AP Reviewed-by: Lance Richardson Reviewed-by: Ajit Khaparde --- drivers/net/bnxt/bnxt.h | 50 +++++++++++++++++++++++++++++++++ drivers/net/bnxt/bnxt_ethdev.c | 51 ++-------------------------------- 2 files changed, 53 insertions(+), 48 deletions(-) diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h index 080365804c..189f693b06 100644 --- a/drivers/net/bnxt/bnxt.h +++ b/drivers/net/bnxt/bnxt.h @@ -21,6 +21,56 @@ #include "bnxt_cpr.h" #include "bnxt_util.h" +/* Vendor ID */ +#define PCI_VENDOR_ID_BROADCOM 0x14E4 + +/* Device IDs */ +#define BROADCOM_DEV_ID_STRATUS_NIC_VF1 0x1606 +#define BROADCOM_DEV_ID_STRATUS_NIC_VF2 0x1609 +#define BROADCOM_DEV_ID_STRATUS_NIC 0x1614 +#define BROADCOM_DEV_ID_57414_VF 0x16c1 +#define BROADCOM_DEV_ID_57301 0x16c8 +#define BROADCOM_DEV_ID_57302 0x16c9 +#define BROADCOM_DEV_ID_57304_PF 0x16ca +#define BROADCOM_DEV_ID_57304_VF 0x16cb +#define BROADCOM_DEV_ID_57417_MF 0x16cc +#define BROADCOM_DEV_ID_NS2 0x16cd +#define BROADCOM_DEV_ID_57311 0x16ce +#define BROADCOM_DEV_ID_57312 0x16cf +#define BROADCOM_DEV_ID_57402 0x16d0 +#define BROADCOM_DEV_ID_57404 0x16d1 +#define BROADCOM_DEV_ID_57406_PF 0x16d2 +#define BROADCOM_DEV_ID_57406_VF 0x16d3 +#define BROADCOM_DEV_ID_57402_MF 0x16d4 +#define BROADCOM_DEV_ID_57407_RJ45 0x16d5 +#define BROADCOM_DEV_ID_57412 0x16d6 +#define BROADCOM_DEV_ID_57414 0x16d7 +#define BROADCOM_DEV_ID_57416_RJ45 0x16d8 +#define BROADCOM_DEV_ID_57417_RJ45 0x16d9 +#define BROADCOM_DEV_ID_5741X_VF 0x16dc +#define BROADCOM_DEV_ID_57412_MF 0x16de +#define BROADCOM_DEV_ID_57314 0x16df +#define BROADCOM_DEV_ID_57317_RJ45 0x16e0 +#define BROADCOM_DEV_ID_5731X_VF 0x16e1 +#define BROADCOM_DEV_ID_57417_SFP 0x16e2 +#define BROADCOM_DEV_ID_57416_SFP 0x16e3 +#define BROADCOM_DEV_ID_57317_SFP 0x16e4 +#define BROADCOM_DEV_ID_57404_MF 0x16e7 +#define BROADCOM_DEV_ID_57406_MF 0x16e8 +#define BROADCOM_DEV_ID_57407_SFP 0x16e9 +#define BROADCOM_DEV_ID_57407_MF 0x16ea +#define BROADCOM_DEV_ID_57414_MF 0x16ec +#define BROADCOM_DEV_ID_57416_MF 0x16ee +#define BROADCOM_DEV_ID_57508 0x1750 +#define BROADCOM_DEV_ID_57504 0x1751 +#define BROADCOM_DEV_ID_57502 0x1752 +#define BROADCOM_DEV_ID_57500_VF1 0x1806 +#define BROADCOM_DEV_ID_57500_VF2 0x1807 +#define BROADCOM_DEV_ID_58802 0xd802 +#define BROADCOM_DEV_ID_58804 0xd804 +#define BROADCOM_DEV_ID_58808 0x16f0 +#define BROADCOM_DEV_ID_58802_VF 0xd800 + #define BNXT_MAX_MTU 9574 #define VLAN_TAG_SIZE 4 #define BNXT_NUM_VLANS 2 diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index 90a97fac1b..b58a875c7d 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -32,54 +32,9 @@ static const char bnxt_version[] = "Broadcom NetXtreme driver " DRV_MODULE_NAME; int bnxt_logtype_driver; -#define PCI_VENDOR_ID_BROADCOM 0x14E4 - -#define BROADCOM_DEV_ID_STRATUS_NIC_VF1 0x1606 -#define BROADCOM_DEV_ID_STRATUS_NIC_VF2 0x1609 -#define BROADCOM_DEV_ID_STRATUS_NIC 0x1614 -#define BROADCOM_DEV_ID_57414_VF 0x16c1 -#define BROADCOM_DEV_ID_57301 0x16c8 -#define BROADCOM_DEV_ID_57302 0x16c9 -#define BROADCOM_DEV_ID_57304_PF 0x16ca -#define BROADCOM_DEV_ID_57304_VF 0x16cb -#define BROADCOM_DEV_ID_57417_MF 0x16cc -#define BROADCOM_DEV_ID_NS2 0x16cd -#define BROADCOM_DEV_ID_57311 0x16ce -#define BROADCOM_DEV_ID_57312 0x16cf -#define BROADCOM_DEV_ID_57402 0x16d0 -#define BROADCOM_DEV_ID_57404 0x16d1 -#define BROADCOM_DEV_ID_57406_PF 0x16d2 -#define BROADCOM_DEV_ID_57406_VF 0x16d3 -#define BROADCOM_DEV_ID_57402_MF 0x16d4 -#define BROADCOM_DEV_ID_57407_RJ45 0x16d5 -#define BROADCOM_DEV_ID_57412 0x16d6 -#define BROADCOM_DEV_ID_57414 0x16d7 -#define BROADCOM_DEV_ID_57416_RJ45 0x16d8 -#define BROADCOM_DEV_ID_57417_RJ45 0x16d9 -#define BROADCOM_DEV_ID_5741X_VF 0x16dc -#define BROADCOM_DEV_ID_57412_MF 0x16de -#define BROADCOM_DEV_ID_57314 0x16df -#define BROADCOM_DEV_ID_57317_RJ45 0x16e0 -#define BROADCOM_DEV_ID_5731X_VF 0x16e1 -#define BROADCOM_DEV_ID_57417_SFP 0x16e2 -#define BROADCOM_DEV_ID_57416_SFP 0x16e3 -#define BROADCOM_DEV_ID_57317_SFP 0x16e4 -#define BROADCOM_DEV_ID_57404_MF 0x16e7 -#define BROADCOM_DEV_ID_57406_MF 0x16e8 -#define BROADCOM_DEV_ID_57407_SFP 0x16e9 -#define BROADCOM_DEV_ID_57407_MF 0x16ea -#define BROADCOM_DEV_ID_57414_MF 0x16ec -#define BROADCOM_DEV_ID_57416_MF 0x16ee -#define BROADCOM_DEV_ID_57508 0x1750 -#define BROADCOM_DEV_ID_57504 0x1751 -#define BROADCOM_DEV_ID_57502 0x1752 -#define BROADCOM_DEV_ID_57500_VF1 0x1806 -#define BROADCOM_DEV_ID_57500_VF2 0x1807 -#define BROADCOM_DEV_ID_58802 0xd802 -#define BROADCOM_DEV_ID_58804 0xd804 -#define BROADCOM_DEV_ID_58808 0x16f0 -#define BROADCOM_DEV_ID_58802_VF 0xd800 - +/* + * The set of PCI devices this driver supports + */ static const struct rte_pci_id bnxt_pci_id_map[] = { { RTE_PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, BROADCOM_DEV_ID_STRATUS_NIC_VF1) }, -- 2.20.1