git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net/i40e: fix time sync for 25G
[dpdk.git]
/
drivers
/
net
/
qede
/
qede_main.c
diff --git
a/drivers/net/qede/qede_main.c
b/drivers/net/qede/qede_main.c
index
a0c9e03
..
ec6190b
100644
(file)
--- a/
drivers/net/qede/qede_main.c
+++ b/
drivers/net/qede/qede_main.c
@@
-1,14
+1,13
@@
-/*
- * Copyright (c) 2016
QLogic Corporation
.
+/*
SPDX-License-Identifier: BSD-3-Clause
+ * Copyright (c) 2016
- 2018 Cavium Inc
.
* All rights reserved.
* All rights reserved.
- * www.qlogic.com
- *
- * See LICENSE.qede_pmd for copyright and licensing details.
+ * www.cavium.com
*/
#include <limits.h>
#include <time.h>
#include <rte_alarm.h>
*/
#include <limits.h>
#include <time.h>
#include <rte_alarm.h>
+#include <rte_string_fns.h>
#include "qede_ethdev.h"
#include "qede_ethdev.h"
@@
-16,10
+15,10
@@
#define QEDE_ALARM_TIMEOUT_US 100000
/* Global variable to hold absolute path of fw file */
#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.3
0.12
.0.bin";
+
static const char * const
QEDE_DEFAULT_FIRMWARE =
+ "/lib/firmware/qed/qed_init_values-8.3
7.7
.0.bin";
static void
qed_update_pf_params(struct ecore_dev *edev, struct ecore_pf_params *params)
static void
qed_update_pf_params(struct ecore_dev *edev, struct ecore_pf_params *params)
@@
-62,6
+61,7
@@
qed_probe(struct ecore_dev *edev, struct rte_pci_device *pci_dev,
hw_prepare_params.chk_reg_fifo = false;
hw_prepare_params.initiate_pf_flr = true;
hw_prepare_params.allow_mdump = false;
hw_prepare_params.chk_reg_fifo = false;
hw_prepare_params.initiate_pf_flr = true;
hw_prepare_params.allow_mdump = false;
+ hw_prepare_params.b_en_pacing = false;
hw_prepare_params.epoch = (u32)time(NULL);
rc = ecore_hw_prepare(edev, &hw_prepare_params);
if (rc) {
hw_prepare_params.epoch = (u32)time(NULL);
rc = ecore_hw_prepare(edev, &hw_prepare_params);
if (rc) {
@@
-126,11
+126,11
@@
static int qed_load_firmware_data(struct ecore_dev *edev)
const char *fw = RTE_LIBRTE_QEDE_FW;
if (strcmp(fw, "") == 0)
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
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;
if (fd < 0) {
DP_ERR(edev, "Can't open firmware file\n");
return -ENOENT;
@@
-179,7
+179,7
@@
static void qed_handle_bulletin_change(struct ecore_hwfn *hwfn)
rte_memcpy(hwfn->hw_info.hw_mac_addr, mac, ETH_ALEN);
/* Always update link configuration according to bulletin */
rte_memcpy(hwfn->hw_info.hw_mac_addr, mac, ETH_ALEN);
/* Always update link configuration according to bulletin */
- qed_link_update(hwfn
, NULL
);
+ qed_link_update(hwfn);
}
static void qede_vf_task(void *arg)
}
static void qede_vf_task(void *arg)
@@
-234,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) {
#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
goto err;
}
#endif
@@
-279,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;
/* 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;
hw_init_params.allow_npar_tx_switch = true;
hw_init_params.bin_fw_data = data;
@@
-287,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;
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);
hw_init_params.p_drv_load_params = &drv_load_params;
rc = ecore_hw_init(edev, &hw_init_params);
@@
-302,9
+304,8
@@
static int qed_slowpath_start(struct ecore_dev *edev,
drv_version.version = (params->drv_major << 24) |
(params->drv_minor << 16) |
(params->drv_rev << 8) | (params->drv_eng);
drv_version.version = (params->drv_major << 24) |
(params->drv_minor << 16) |
(params->drv_rev << 8) | (params->drv_eng);
- /* TBD: strlcpy() */
- strncpy((char *)drv_version.name, (const char *)params->name,
- MCP_DRV_VER_STR_SIZE - 4);
+ strlcpy((char *)drv_version.name, (const char *)params->name,
+ sizeof(drv_version.name));
rc = ecore_mcp_send_drv_version(hwfn, hwfn->p_main_ptt,
&drv_version);
if (rc) {
rc = ecore_mcp_send_drv_version(hwfn, hwfn->p_main_ptt,
&drv_version);
if (rc) {
@@
-629,11
+630,15
@@
static int qed_set_link(struct ecore_dev *edev, struct qed_link_params *params)
return rc;
}
return rc;
}
-void qed_link_update(struct ecore_hwfn *hwfn
, struct ecore_ptt *ptt
)
+void qed_link_update(struct ecore_hwfn *hwfn)
{
{
- struct qed_link_output if_link;
+ struct ecore_dev *edev = hwfn->p_dev;
+ struct qede_dev *qdev = (struct qede_dev *)edev;
+ struct rte_eth_dev *dev = (struct rte_eth_dev *)qdev->ethdev;
- qed_fill_link(hwfn, ptt, &if_link);
+ if (!qede_link_update(dev, 0))
+ _rte_eth_dev_callback_process(dev,
+ RTE_ETH_EVENT_INTR_LSC, NULL);
}
static int qed_drain(struct ecore_dev *edev)
}
static int qed_drain(struct ecore_dev *edev)