net: thunderx: Add VNIC's PCI devid on future chips
authorSunil Goutham <sgoutham@cavium.com>
Fri, 12 Aug 2016 11:21:25 +0000 (16:51 +0530)
committerDavid S. Miller <davem@davemloft.net>
Sat, 13 Aug 2016 18:59:29 +0000 (11:59 -0700)
This patch adds PCI device IDs of VNIC on newer chips and also
registers VF driver with them. Device id remains same for all
versions of chips but subsystem device id changes.

Signed-off-by: Sunil Goutham <sgoutham@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cavium/thunder/nic.h
drivers/net/ethernet/cavium/thunder/nicvf_main.c

index 66b499b1b774ec379b1791d85d8789f48ee31cbc..6b0b2407ca3b818d3431d0cd94245a892c8dc6aa 100644 (file)
 #define        PCI_DEVICE_ID_THUNDER_BGX               0xA026
 
 /* Subsystem device IDs */
-#define PCI_SUBSYS_DEVID_88XX_NIC_PF           0xA11E
+#define PCI_SUBSYS_DEVID_88XX_NIC_PF           0xA11E
+#define PCI_SUBSYS_DEVID_81XX_NIC_PF           0xA21E
+#define PCI_SUBSYS_DEVID_83XX_NIC_PF           0xA31E
+
+#define PCI_SUBSYS_DEVID_88XX_PASS1_NIC_VF     0xA11E
+#define PCI_SUBSYS_DEVID_88XX_NIC_VF           0xA134
+#define PCI_SUBSYS_DEVID_81XX_NIC_VF           0xA234
+#define PCI_SUBSYS_DEVID_83XX_NIC_VF           0xA334
+
 
 /* PCI BAR nos */
 #define        PCI_CFG_REG_BAR_NUM             0
index a19e73f11d73c84a829d95980688249c511b21c4..0c106350d5a8f4037d99bbf9ffb7a14921a529ec 100644 (file)
 static const struct pci_device_id nicvf_id_table[] = {
        { PCI_DEVICE_SUB(PCI_VENDOR_ID_CAVIUM,
                         PCI_DEVICE_ID_THUNDER_NIC_VF,
-                        PCI_VENDOR_ID_CAVIUM, 0xA134) },
+                        PCI_VENDOR_ID_CAVIUM,
+                        PCI_SUBSYS_DEVID_88XX_NIC_VF) },
        { PCI_DEVICE_SUB(PCI_VENDOR_ID_CAVIUM,
                         PCI_DEVICE_ID_THUNDER_PASS1_NIC_VF,
-                        PCI_VENDOR_ID_CAVIUM, 0xA11E) },
+                        PCI_VENDOR_ID_CAVIUM,
+                        PCI_SUBSYS_DEVID_88XX_PASS1_NIC_VF) },
+       { PCI_DEVICE_SUB(PCI_VENDOR_ID_CAVIUM,
+                        PCI_DEVICE_ID_THUNDER_NIC_VF,
+                        PCI_VENDOR_ID_CAVIUM,
+                        PCI_SUBSYS_DEVID_81XX_NIC_VF) },
+       { PCI_DEVICE_SUB(PCI_VENDOR_ID_CAVIUM,
+                        PCI_DEVICE_ID_THUNDER_NIC_VF,
+                        PCI_VENDOR_ID_CAVIUM,
+                        PCI_SUBSYS_DEVID_83XX_NIC_VF) },
        { 0, }  /* end of table */
 };