net/qede: add PCI ids for new chip variant
authorRasesh Mody <rasesh.mody@cavium.com>
Thu, 5 Jan 2017 07:04:02 +0000 (23:04 -0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 17 Jan 2017 18:40:53 +0000 (19:40 +0100)
Add PCI IDs for new asic type (defined as CHIP_NUM_AH_xxx).
It supports 50G, 40G, 25G and 10G speeds.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
drivers/net/qede/base/ecore_dev.c
drivers/net/qede/qede_ethdev.c
drivers/net/qede/qede_ethdev.h

index 5a29c45..03620d9 100644 (file)
@@ -2365,7 +2365,12 @@ static enum _ecore_status_t ecore_hw_get_resc(struct ecore_hwfn *p_hwfn,
 #endif
 
        for (res_id = 0; res_id < ECORE_MAX_RESC; res_id++) {
-               rc = ecore_hw_set_resc_info(p_hwfn, res_id, drv_resc_alloc);
+               /* @@@TMP for AH:
+                * Force the driver's default resource allocation in case there
+                * is a diff with the MFW allocation value.
+                */
+               rc = ecore_hw_set_resc_info(p_hwfn, res_id,
+                                           b_ah || drv_resc_alloc);
                if (rc != ECORE_SUCCESS)
                        return rc;
        }
index 8a62f3b..7d5b8b3 100644 (file)
@@ -2267,10 +2267,13 @@ static int qedevf_eth_dev_uninit(struct rte_eth_dev *eth_dev)
 static struct rte_pci_id pci_id_qedevf_map[] = {
 #define QEDEVF_RTE_PCI_DEVICE(dev) RTE_PCI_DEVICE(PCI_VENDOR_ID_QLOGIC, dev)
        {
-               QEDEVF_RTE_PCI_DEVICE(PCI_DEVICE_ID_NX2_VF)
+               QEDEVF_RTE_PCI_DEVICE(PCI_DEVICE_ID_QLOGIC_NX2_VF)
        },
        {
-               QEDEVF_RTE_PCI_DEVICE(PCI_DEVICE_ID_57980S_IOV)
+               QEDEVF_RTE_PCI_DEVICE(PCI_DEVICE_ID_QLOGIC_57980S_IOV)
+       },
+       {
+               QEDEVF_RTE_PCI_DEVICE(PCI_DEVICE_ID_QLOGIC_AH_IOV)
        },
        {.vendor_id = 0,}
 };
@@ -2278,19 +2281,31 @@ static struct rte_pci_id pci_id_qedevf_map[] = {
 static struct rte_pci_id pci_id_qede_map[] = {
 #define QEDE_RTE_PCI_DEVICE(dev) RTE_PCI_DEVICE(PCI_VENDOR_ID_QLOGIC, dev)
        {
-               QEDE_RTE_PCI_DEVICE(PCI_DEVICE_ID_NX2_57980E)
+               QEDE_RTE_PCI_DEVICE(PCI_DEVICE_ID_QLOGIC_NX2_57980E)
+       },
+       {
+               QEDE_RTE_PCI_DEVICE(PCI_DEVICE_ID_QLOGIC_NX2_57980S)
+       },
+       {
+               QEDE_RTE_PCI_DEVICE(PCI_DEVICE_ID_QLOGIC_57980S_40)
+       },
+       {
+               QEDE_RTE_PCI_DEVICE(PCI_DEVICE_ID_QLOGIC_57980S_25)
+       },
+       {
+               QEDE_RTE_PCI_DEVICE(PCI_DEVICE_ID_QLOGIC_57980S_100)
        },
        {
-               QEDE_RTE_PCI_DEVICE(PCI_DEVICE_ID_NX2_57980S)
+               QEDE_RTE_PCI_DEVICE(PCI_DEVICE_ID_QLOGIC_AH_50G)
        },
        {
-               QEDE_RTE_PCI_DEVICE(PCI_DEVICE_ID_57980S_40)
+               QEDE_RTE_PCI_DEVICE(PCI_DEVICE_ID_QLOGIC_AH_10G)
        },
        {
-               QEDE_RTE_PCI_DEVICE(PCI_DEVICE_ID_57980S_25)
+               QEDE_RTE_PCI_DEVICE(PCI_DEVICE_ID_QLOGIC_AH_40G)
        },
        {
-               QEDE_RTE_PCI_DEVICE(PCI_DEVICE_ID_57980S_100)
+               QEDE_RTE_PCI_DEVICE(PCI_DEVICE_ID_QLOGIC_AH_25G)
        },
        {.vendor_id = 0,}
 };
index 95e06ef..19a4ece 100644 (file)
        struct ecore_dev *edev = &qdev->edev;                   \
 }
 
-/************* QLogic 25G/40G/100G vendor/devices ids *************/
-#define PCI_VENDOR_ID_QLOGIC            0x1077
-
-#define CHIP_NUM_57980E                 0x1634
-#define CHIP_NUM_57980S                 0x1629
-#define CHIP_NUM_VF                     0x1630
-#define CHIP_NUM_57980S_40              0x1634
-#define CHIP_NUM_57980S_25              0x1656
-#define CHIP_NUM_57980S_IOV             0x1664
-#define CHIP_NUM_57980S_100             0x1644
-
-#define PCI_DEVICE_ID_NX2_57980E        CHIP_NUM_57980E
-#define PCI_DEVICE_ID_NX2_57980S        CHIP_NUM_57980S
-#define PCI_DEVICE_ID_NX2_VF            CHIP_NUM_VF
-#define PCI_DEVICE_ID_57980S_40         CHIP_NUM_57980S_40
-#define PCI_DEVICE_ID_57980S_25         CHIP_NUM_57980S_25
-#define PCI_DEVICE_ID_57980S_IOV        CHIP_NUM_57980S_IOV
-#define PCI_DEVICE_ID_57980S_100        CHIP_NUM_57980S_100
+/************* QLogic 10G/25G/40G/50G/100G vendor/devices ids *************/
+#define PCI_VENDOR_ID_QLOGIC                   0x1077
+
+#define CHIP_NUM_57980E                        0x1634
+#define CHIP_NUM_57980S                        0x1629
+#define CHIP_NUM_VF                            0x1630
+#define CHIP_NUM_57980S_40                     0x1634
+#define CHIP_NUM_57980S_25                     0x1656
+#define CHIP_NUM_57980S_IOV                    0x1664
+#define CHIP_NUM_57980S_100                    0x1644
+#define CHIP_NUM_AH_50G                               0x8070
+#define CHIP_NUM_AH_10G                        0x8071
+#define CHIP_NUM_AH_40G                               0x8072
+#define CHIP_NUM_AH_25G                               0x8073
+#define CHIP_NUM_AH_IOV                               0x8090
+
+#define PCI_DEVICE_ID_QLOGIC_NX2_57980E        CHIP_NUM_57980E
+#define PCI_DEVICE_ID_QLOGIC_NX2_57980S        CHIP_NUM_57980S
+#define PCI_DEVICE_ID_QLOGIC_NX2_VF            CHIP_NUM_VF
+#define PCI_DEVICE_ID_QLOGIC_57980S_40         CHIP_NUM_57980S_40
+#define PCI_DEVICE_ID_QLOGIC_57980S_25         CHIP_NUM_57980S_25
+#define PCI_DEVICE_ID_QLOGIC_57980S_IOV        CHIP_NUM_57980S_IOV
+#define PCI_DEVICE_ID_QLOGIC_57980S_100        CHIP_NUM_57980S_100
+#define PCI_DEVICE_ID_QLOGIC_AH_50G            CHIP_NUM_AH_50G
+#define PCI_DEVICE_ID_QLOGIC_AH_10G            CHIP_NUM_AH_10G
+#define PCI_DEVICE_ID_QLOGIC_AH_40G            CHIP_NUM_AH_40G
+#define PCI_DEVICE_ID_QLOGIC_AH_25G            CHIP_NUM_AH_25G
+#define PCI_DEVICE_ID_QLOGIC_AH_IOV            CHIP_NUM_AH_IOV
+
 
 #define QEDE_VXLAN_DEF_PORT            8472