Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1461108

[PATCH v2 02/21] net: thunderx: Add VNIC's PCI devid on future chips

From sunil.kovvuri@gmail.com
Newsgroups linux.kernel
Subject [PATCH v2 02/21] net: thunderx: Add VNIC's PCI devid on future chips
Date 2016-08-12 13:30 +0200
Message-ID <s5iP0-Yf-45@gated-at.bofh.it> (permalink)
References <s5iOZ-Yf-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Sunil Goutham <sgoutham@cavium.com>

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>
---
 drivers/net/ethernet/cavium/thunder/nic.h        | 10 +++++++++-
 drivers/net/ethernet/cavium/thunder/nicvf_main.c | 14 ++++++++++++--
 2 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/cavium/thunder/nic.h b/drivers/net/ethernet/cavium/thunder/nic.h
index 66b499b..6b0b240 100644
--- a/drivers/net/ethernet/cavium/thunder/nic.h
+++ b/drivers/net/ethernet/cavium/thunder/nic.h
@@ -21,7 +21,15 @@
 #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
diff --git a/drivers/net/ethernet/cavium/thunder/nicvf_main.c b/drivers/net/ethernet/cavium/thunder/nicvf_main.c
index a19e73f..0c10635 100644
--- a/drivers/net/ethernet/cavium/thunder/nicvf_main.c
+++ b/drivers/net/ethernet/cavium/thunder/nicvf_main.c
@@ -29,10 +29,20 @@
 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 */
 };
 
-- 
2.7.4

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 00/21] net: thunderx: Support for newer chips and miscellaneous patches sunil.kovvuri@gmail.com - 2016-08-12 13:30 +0200
  [PATCH v2 01/21] net: thunderx: Moved HW capability info from macros to structure sunil.kovvuri@gmail.com - 2016-08-12 13:30 +0200
  [PATCH v2 11/21] net: thunderx: Add support for 16 LMACs of 83xx sunil.kovvuri@gmail.com - 2016-08-12 13:30 +0200
  [PATCH v2 02/21] net: thunderx: Add VNIC's PCI devid on future chips sunil.kovvuri@gmail.com - 2016-08-12 13:30 +0200
  [PATCH v2 10/21] net: thunderx: Add RGMII interface type support sunil.kovvuri@gmail.com - 2016-08-12 13:30 +0200
  [PATCH v2 20/21] net: thunderx: Use netdev_rss_key_fill() helper sunil.kovvuri@gmail.com - 2016-08-12 13:30 +0200
  [PATCH v2 15/21] net: thunderx: Improvement for MBX interface debug messages sunil.kovvuri@gmail.com - 2016-08-12 13:30 +0200
  [PATCH v2 09/21] net: thunderx: Add QSGMII interface type support sunil.kovvuri@gmail.com - 2016-08-12 13:30 +0200
  Re: [PATCH v2 00/21] net: thunderx: Support for newer chips and  miscellaneous patches David Miller <davem@davemloft.net> - 2016-08-14 11:10 +0200

csiph-web