iavf: rename device ID defines
authorJesse Brandeburg <jesse.brandeburg@intel.com>
Sat, 15 Sep 2018 00:37:50 +0000 (17:37 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 18 Sep 2018 22:17:59 +0000 (15:17 -0700)
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>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/iavf/i40e_adminq.c
drivers/net/ethernet/intel/iavf/i40e_common.c
drivers/net/ethernet/intel/iavf/i40e_devids.h
drivers/net/ethernet/intel/iavf/i40e_type.h
drivers/net/ethernet/intel/iavf/iavf_main.c

index 3ad8b0cec7f901f8fc04ef2e36b0722acb741ce1..aa8ce7eea6b5c951f981f29b27a7a432cf5c1702 100644 (file)
 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;
 }
 
 /**
index 733e5cfeaf7172fa540d961332d0ee4942a86d09..b97e8925d20e1c2c542eebb5b3e3eae963418443 100644 (file)
@@ -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:
index f300bf271824acbc515ea4faf2d093b3328f99e2..8eb7b697e96c6ed692dea8d881e6759b7fa3ffb2 100644 (file)
@@ -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_ */
index ba2e7d81bf46ba396a93d36f6bc0561114c7db4e..f04fa81e4ea378915bae9b35cdbe065ef34f9d05 100644 (file)
@@ -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;
index 9d6bffca8ccc7dabd26f3280b23747ad4c317e3c..c44d0abc0a7dd9090a0191de45661e835642e5ff 100644 (file)
@@ -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, }
 };