Netdev List
 help / color / mirror / Atom feed
From: Jesse Brandeburg <jesse.brandeburg@intel.com>
To: netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org
Cc: jeffrey.t.kirsher@intel.com
Subject: [PATCH net-next v2 07/14] iavf: rename device ID defines
Date: Fri, 14 Sep 2018 17:37:50 -0700	[thread overview]
Message-ID: <20180915003757.169108-8-jesse.brandeburg@intel.com> (raw)
In-Reply-To: <20180915003757.169108-1-jesse.brandeburg@intel.com>

Rename the device ID defines to have IAVF in them
and remove all the unused defines.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
---
 drivers/net/ethernet/intel/iavf/i40e_adminq.c | 22 +++++++--------
 drivers/net/ethernet/intel/iavf/i40e_common.c | 29 +++----------------
 drivers/net/ethernet/intel/iavf/i40e_devids.h | 40 ++++++---------------------
 drivers/net/ethernet/intel/iavf/i40e_type.h   |  6 ----
 drivers/net/ethernet/intel/iavf/iavf_main.c   |  8 +++---
 5 files changed, 27 insertions(+), 78 deletions(-)

diff --git a/drivers/net/ethernet/intel/iavf/i40e_adminq.c b/drivers/net/ethernet/intel/iavf/i40e_adminq.c
index 50e0f1225298..8110b92fa2b0 100644
--- a/drivers/net/ethernet/intel/iavf/i40e_adminq.c
+++ b/drivers/net/ethernet/intel/iavf/i40e_adminq.c
@@ -16,18 +16,16 @@
 static void i40e_adminq_init_regs(struct i40e_hw *hw)
 {
 	/* set head and tail registers in our local struct */
-	if (i40e_is_vf(hw)) {
-		hw->aq.asq.tail = IAVF_VF_ATQT1;
-		hw->aq.asq.head = IAVF_VF_ATQH1;
-		hw->aq.asq.len  = IAVF_VF_ATQLEN1;
-		hw->aq.asq.bal  = IAVF_VF_ATQBAL1;
-		hw->aq.asq.bah  = IAVF_VF_ATQBAH1;
-		hw->aq.arq.tail = IAVF_VF_ARQT1;
-		hw->aq.arq.head = IAVF_VF_ARQH1;
-		hw->aq.arq.len  = IAVF_VF_ARQLEN1;
-		hw->aq.arq.bal  = IAVF_VF_ARQBAL1;
-		hw->aq.arq.bah  = IAVF_VF_ARQBAH1;
-	}
+	hw->aq.asq.tail = IAVF_VF_ATQT1;
+	hw->aq.asq.head = IAVF_VF_ATQH1;
+	hw->aq.asq.len  = IAVF_VF_ATQLEN1;
+	hw->aq.asq.bal  = IAVF_VF_ATQBAL1;
+	hw->aq.asq.bah  = IAVF_VF_ATQBAH1;
+	hw->aq.arq.tail = IAVF_VF_ARQT1;
+	hw->aq.arq.head = IAVF_VF_ARQH1;
+	hw->aq.arq.len  = IAVF_VF_ARQLEN1;
+	hw->aq.arq.bal  = IAVF_VF_ARQBAL1;
+	hw->aq.arq.bah  = IAVF_VF_ARQBAH1;
 }
 
 /**
diff --git a/drivers/net/ethernet/intel/iavf/i40e_common.c b/drivers/net/ethernet/intel/iavf/i40e_common.c
index 733e5cfeaf71..b97e8925d20e 100644
--- a/drivers/net/ethernet/intel/iavf/i40e_common.c
+++ b/drivers/net/ethernet/intel/iavf/i40e_common.c
@@ -19,33 +19,12 @@ iavf_status i40e_set_mac_type(struct i40e_hw *hw)
 
 	if (hw->vendor_id == PCI_VENDOR_ID_INTEL) {
 		switch (hw->device_id) {
-		case I40E_DEV_ID_SFP_XL710:
-		case I40E_DEV_ID_QEMU:
-		case I40E_DEV_ID_KX_B:
-		case I40E_DEV_ID_KX_C:
-		case I40E_DEV_ID_QSFP_A:
-		case I40E_DEV_ID_QSFP_B:
-		case I40E_DEV_ID_QSFP_C:
-		case I40E_DEV_ID_10G_BASE_T:
-		case I40E_DEV_ID_10G_BASE_T4:
-		case I40E_DEV_ID_20G_KR2:
-		case I40E_DEV_ID_20G_KR2_A:
-		case I40E_DEV_ID_25G_B:
-		case I40E_DEV_ID_25G_SFP28:
-			hw->mac.type = I40E_MAC_XL710;
-			break;
-		case I40E_DEV_ID_SFP_X722:
-		case I40E_DEV_ID_1G_BASE_T_X722:
-		case I40E_DEV_ID_10G_BASE_T_X722:
-		case I40E_DEV_ID_SFP_I_X722:
-			hw->mac.type = I40E_MAC_X722;
-			break;
-		case I40E_DEV_ID_X722_VF:
+		case IAVF_DEV_ID_X722_VF:
 			hw->mac.type = I40E_MAC_X722_VF;
 			break;
-		case I40E_DEV_ID_VF:
-		case I40E_DEV_ID_VF_HV:
-		case I40E_DEV_ID_ADAPTIVE_VF:
+		case IAVF_DEV_ID_VF:
+		case IAVF_DEV_ID_VF_HV:
+		case IAVF_DEV_ID_ADAPTIVE_VF:
 			hw->mac.type = I40E_MAC_VF;
 			break;
 		default:
diff --git a/drivers/net/ethernet/intel/iavf/i40e_devids.h b/drivers/net/ethernet/intel/iavf/i40e_devids.h
index f300bf271824..8eb7b697e96c 100644
--- a/drivers/net/ethernet/intel/iavf/i40e_devids.h
+++ b/drivers/net/ethernet/intel/iavf/i40e_devids.h
@@ -1,34 +1,12 @@
 /* SPDX-License-Identifier: GPL-2.0 */
 /* Copyright(c) 2013 - 2018 Intel Corporation. */
 
-#ifndef _I40E_DEVIDS_H_
-#define _I40E_DEVIDS_H_
-
-/* Device IDs */
-#define I40E_DEV_ID_SFP_XL710		0x1572
-#define I40E_DEV_ID_QEMU		0x1574
-#define I40E_DEV_ID_KX_B		0x1580
-#define I40E_DEV_ID_KX_C		0x1581
-#define I40E_DEV_ID_QSFP_A		0x1583
-#define I40E_DEV_ID_QSFP_B		0x1584
-#define I40E_DEV_ID_QSFP_C		0x1585
-#define I40E_DEV_ID_10G_BASE_T		0x1586
-#define I40E_DEV_ID_20G_KR2		0x1587
-#define I40E_DEV_ID_20G_KR2_A		0x1588
-#define I40E_DEV_ID_10G_BASE_T4		0x1589
-#define I40E_DEV_ID_25G_B		0x158A
-#define I40E_DEV_ID_25G_SFP28		0x158B
-#define I40E_DEV_ID_VF			0x154C
-#define I40E_DEV_ID_VF_HV		0x1571
-#define I40E_DEV_ID_ADAPTIVE_VF		0x1889
-#define I40E_DEV_ID_SFP_X722		0x37D0
-#define I40E_DEV_ID_1G_BASE_T_X722	0x37D1
-#define I40E_DEV_ID_10G_BASE_T_X722	0x37D2
-#define I40E_DEV_ID_SFP_I_X722		0x37D3
-#define I40E_DEV_ID_X722_VF		0x37CD
-
-#define i40e_is_40G_device(d)		((d) == I40E_DEV_ID_QSFP_A  || \
-					 (d) == I40E_DEV_ID_QSFP_B  || \
-					 (d) == I40E_DEV_ID_QSFP_C)
-
-#endif /* _I40E_DEVIDS_H_ */
+#ifndef _IAVF_DEVIDS_H_
+#define _IAVF_DEVIDS_H_
+
+/* Device IDs for the VF driver */
+#define IAVF_DEV_ID_VF			0x154C
+#define IAVF_DEV_ID_VF_HV		0x1571
+#define IAVF_DEV_ID_ADAPTIVE_VF		0x1889
+#define IAVF_DEV_ID_X722_VF		0x37CD
+#endif /* _IAVF_DEVIDS_H_ */
diff --git a/drivers/net/ethernet/intel/iavf/i40e_type.h b/drivers/net/ethernet/intel/iavf/i40e_type.h
index eea5b86a37b4..bcb1805a2f3a 100644
--- a/drivers/net/ethernet/intel/iavf/i40e_type.h
+++ b/drivers/net/ethernet/intel/iavf/i40e_type.h
@@ -193,12 +193,6 @@ struct i40e_hw {
 	char err_str[16];
 };
 
-static inline bool i40e_is_vf(struct i40e_hw *hw)
-{
-	return (hw->mac.type == I40E_MAC_VF ||
-		hw->mac.type == I40E_MAC_X722_VF);
-}
-
 struct i40e_driver_version {
 	u8 major_version;
 	u8 minor_version;
diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c b/drivers/net/ethernet/intel/iavf/iavf_main.c
index 01fd440b4bbe..5a3884b65ca8 100644
--- a/drivers/net/ethernet/intel/iavf/iavf_main.c
+++ b/drivers/net/ethernet/intel/iavf/iavf_main.c
@@ -41,10 +41,10 @@ static const char iavf_copyright[] =
  *   Class, Class Mask, private data (not used) }
  */
 static const struct pci_device_id iavf_pci_tbl[] = {
-	{PCI_VDEVICE(INTEL, I40E_DEV_ID_VF), 0},
-	{PCI_VDEVICE(INTEL, I40E_DEV_ID_VF_HV), 0},
-	{PCI_VDEVICE(INTEL, I40E_DEV_ID_X722_VF), 0},
-	{PCI_VDEVICE(INTEL, I40E_DEV_ID_ADAPTIVE_VF), 0},
+	{PCI_VDEVICE(INTEL, IAVF_DEV_ID_VF), 0},
+	{PCI_VDEVICE(INTEL, IAVF_DEV_ID_VF_HV), 0},
+	{PCI_VDEVICE(INTEL, IAVF_DEV_ID_X722_VF), 0},
+	{PCI_VDEVICE(INTEL, IAVF_DEV_ID_ADAPTIVE_VF), 0},
 	/* required last entry */
 	{0, }
 };
-- 
2.14.4

  parent reply	other threads:[~2018-09-15  5:54 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-15  0:37 [PATCH net-next v2 00/14] rename and shrink i40evf Jesse Brandeburg
2018-09-15  0:37 ` [PATCH net-next v2 01/14] intel-ethernet: rename i40evf to iavf Jesse Brandeburg
2018-09-15  0:37 ` [PATCH net-next v2 02/14] iavf: diet and reformat Jesse Brandeburg
2018-09-18 14:57   ` [Intel-wired-lan] " Bowers, AndrewX
2018-09-15  0:37 ` [PATCH net-next v2 03/14] iavf: rename functions and structs to new name Jesse Brandeburg
2018-09-15  0:37 ` [PATCH net-next v2 04/14] iavf: rename i40e_status to iavf_status Jesse Brandeburg
2018-09-15  0:37 ` [PATCH net-next v2 05/14] iavf: move i40evf files to new name Jesse Brandeburg
2018-09-15  0:37 ` [PATCH net-next v2 06/14] iavf: remove references to old names Jesse Brandeburg
2018-09-15  0:37 ` Jesse Brandeburg [this message]
2018-09-15  0:37 ` [PATCH net-next v2 08/14] iavf: rename I40E_ADMINQ_DESC Jesse Brandeburg
2018-09-15  0:37 ` [PATCH net-next v2 09/14] iavf: rename i40e_hw to iavf_hw Jesse Brandeburg
2018-09-15  0:37 ` [PATCH net-next v2 10/14] iavf: replace i40e_debug with iavf version Jesse Brandeburg
2018-09-15  0:37 ` [PATCH net-next v2 11/14] iavf: tracing infrastructure rename Jesse Brandeburg
2018-09-15  0:37 ` [PATCH net-next v2 12/14] iavf: rename most of i40e strings Jesse Brandeburg
2018-09-15  0:37 ` [PATCH net-next v2 13/14] iavf: finish renaming files to iavf Jesse Brandeburg
2018-09-15  0:37 ` [PATCH net-next v2 14/14] intel-ethernet: use correct module license Jesse Brandeburg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180915003757.169108-8-jesse.brandeburg@intel.com \
    --to=jesse.brandeburg@intel.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox