net/bnxt: move macro definitions to header file
authorKalesh AP <kalesh-anakkur.purayil@broadcom.com>
Thu, 10 Oct 2019 09:44:32 +0000 (15:14 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 23 Oct 2019 14:43:09 +0000 (16:43 +0200)
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 <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/bnxt.h
drivers/net/bnxt/bnxt_ethdev.c

index 0803658..189f693 100644 (file)
 #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
index 90a97fa..b58a875 100644 (file)
@@ -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) },