net: add rte prefix to ether defines
[dpdk.git] / drivers / net / qede / qede_main.c
index de5a7ca..8a108f9 100644 (file)
@@ -1,9 +1,7 @@
-/*
+/* SPDX-License-Identifier: BSD-3-Clause
  * Copyright (c) 2016 - 2018 Cavium Inc.
  * All rights reserved.
  * www.cavium.com
- *
- * See LICENSE.qede_pmd for copyright and licensing details.
  */
 
 #include <limits.h>
 #define QEDE_ALARM_TIMEOUT_US 100000
 
 /* Global variable to hold absolute path of fw file */
-char fw_file[PATH_MAX];
+char qede_fw_file[PATH_MAX];
 
-const char *QEDE_DEFAULT_FIRMWARE =
-       "/lib/firmware/qed/qed_init_values-8.33.12.0.bin";
+static const char * const QEDE_DEFAULT_FIRMWARE =
+       "/lib/firmware/qed/qed_init_values-8.37.7.0.bin";
 
 static void
 qed_update_pf_params(struct ecore_dev *edev, struct ecore_pf_params *params)
@@ -128,11 +126,11 @@ static int qed_load_firmware_data(struct ecore_dev *edev)
        const char *fw = RTE_LIBRTE_QEDE_FW;
 
        if (strcmp(fw, "") == 0)
-               strcpy(fw_file, QEDE_DEFAULT_FIRMWARE);
+               strcpy(qede_fw_file, QEDE_DEFAULT_FIRMWARE);
        else
-               strcpy(fw_file, fw);
+               strcpy(qede_fw_file, fw);
 
-       fd = open(fw_file, O_RDONLY);
+       fd = open(qede_fw_file, O_RDONLY);
        if (fd < 0) {
                DP_ERR(edev, "Can't open firmware file\n");
                return -ENOENT;
@@ -236,7 +234,8 @@ static int qed_slowpath_start(struct ecore_dev *edev,
 #ifdef CONFIG_ECORE_BINARY_FW
                rc = qed_load_firmware_data(edev);
                if (rc) {
-                       DP_ERR(edev, "Failed to find fw file %s\n", fw_file);
+                       DP_ERR(edev, "Failed to find fw file %s\n",
+                               qede_fw_file);
                        goto err;
                }
 #endif
@@ -281,7 +280,7 @@ static int qed_slowpath_start(struct ecore_dev *edev,
        /* Start the slowpath */
        memset(&hw_init_params, 0, sizeof(hw_init_params));
        hw_init_params.b_hw_start = true;
-       hw_init_params.int_mode = ECORE_INT_MODE_MSIX;
+       hw_init_params.int_mode = params->int_mode;
        hw_init_params.allow_npar_tx_switch = true;
        hw_init_params.bin_fw_data = data;
 
@@ -289,6 +288,7 @@ static int qed_slowpath_start(struct ecore_dev *edev,
        drv_load_params.mfw_timeout_val = ECORE_LOAD_REQ_LOCK_TO_DEFAULT;
        drv_load_params.avoid_eng_reset = false;
        drv_load_params.override_force_load = ECORE_OVERRIDE_FORCE_LOAD_ALWAYS;
+       hw_init_params.avoid_eng_affin = false;
        hw_init_params.p_drv_load_params = &drv_load_params;
 
        rc = ecore_hw_init(edev, &hw_init_params);
@@ -369,7 +369,7 @@ qed_fill_dev_info(struct ecore_dev *edev, struct qed_dev_info *dev_info)
        dev_info->dev_type = edev->type;
 
        rte_memcpy(&dev_info->hw_mac, &edev->hwfns[0].hw_info.hw_mac_addr,
-              ETHER_ADDR_LEN);
+              RTE_ETHER_ADDR_LEN);
 
        dev_info->fw_major = FW_MAJOR_VERSION;
        dev_info->fw_minor = FW_MINOR_VERSION;
@@ -434,7 +434,7 @@ qed_fill_eth_dev_info(struct ecore_dev *edev, struct qed_dev_eth_info *info)
                                         max_vf_vlan_filters;
 
                rte_memcpy(&info->port_mac, &edev->hwfns[0].hw_info.hw_mac_addr,
-                          ETHER_ADDR_LEN);
+                          RTE_ETHER_ADDR_LEN);
        } else {
                ecore_vf_get_num_rxqs(ECORE_LEADING_HWFN(edev),
                                      &info->num_queues);
@@ -455,7 +455,7 @@ qed_fill_eth_dev_info(struct ecore_dev *edev, struct qed_dev_eth_info *info)
        qed_fill_dev_info(edev, &info->common);
 
        if (IS_VF(edev))
-               memset(&info->common.hw_mac, 0, ETHER_ADDR_LEN);
+               memset(&info->common.hw_mac, 0, RTE_ETHER_ADDR_LEN);
 
        return 0;
 }