From: Rasesh Mody Date: Wed, 29 Mar 2017 20:36:23 +0000 (-0700) Subject: net/qede/base: set driver type before sending load request X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=de5588af0b0a23c4fa49dddcb125ee59b63bb179;p=dpdk.git net/qede/base: set driver type before sending load request Set the drv_type before sending LOAD_REQ and remove the ver_str which is not used by the MFW Signed-off-by: Rasesh Mody --- diff --git a/drivers/net/qede/base/ecore.h b/drivers/net/qede/base/ecore.h index 58c97a3a3a..b8c8bfda77 100644 --- a/drivers/net/qede/base/ecore.h +++ b/drivers/net/qede/base/ecore.h @@ -30,7 +30,6 @@ #define MAX_HWFNS_PER_DEVICE 2 #define NAME_SIZE 128 /* @DPDK */ -#define VER_SIZE 16 #define ECORE_WFQ_UNIT 100 #include "../qede_logs.h" /* @DPDK */ @@ -706,7 +705,7 @@ struct ecore_dev { int pcie_width; int pcie_speed; - u8 ver_str[NAME_SIZE]; /* @DPDK */ + /* Add MF related configuration */ u8 mcp_rev; u8 boot_mode; diff --git a/drivers/net/qede/base/ecore_mcp.c b/drivers/net/qede/base/ecore_mcp.c index 9f897b5185..2b9c819f90 100644 --- a/drivers/net/qede/base/ecore_mcp.c +++ b/drivers/net/qede/base/ecore_mcp.c @@ -524,7 +524,6 @@ enum _ecore_status_t ecore_mcp_load_req(struct ecore_hwfn *p_hwfn, { struct ecore_dev *p_dev = p_hwfn->p_dev; struct ecore_mcp_mb_params mb_params; - union drv_union_data union_data; enum _ecore_status_t rc; #ifndef ASIC_ONLY @@ -538,8 +537,6 @@ enum _ecore_status_t ecore_mcp_load_req(struct ecore_hwfn *p_hwfn, mb_params.cmd = DRV_MSG_CODE_LOAD_REQ; mb_params.param = PDA_COMP | DRV_ID_MCP_HSI_VER_CURRENT | p_dev->drv_type; - OSAL_MEMCPY(&union_data.ver_str, p_dev->ver_str, MCP_DRV_VER_STR_SIZE); - mb_params.p_data_src = &union_data; rc = ecore_mcp_cmd_and_union(p_hwfn, p_ptt, &mb_params); /* if mcp fails to respond we must abort */ diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c index c3721810e0..d52e1be965 100644 --- a/drivers/net/qede/qede_ethdev.c +++ b/drivers/net/qede/qede_ethdev.c @@ -2175,7 +2175,7 @@ static int qede_common_dev_init(struct rte_eth_dev *eth_dev, bool is_vf) qede_alloc_etherdev(adapter, &dev_info); - adapter->ops->common->set_id(edev, edev->name, QEDE_PMD_VERSION); + adapter->ops->common->set_name(edev, edev->name); if (!is_vf) adapter->dev_info.num_mac_filters = diff --git a/drivers/net/qede/qede_if.h b/drivers/net/qede/qede_if.h index 1e27428b3a..0a1f7db307 100644 --- a/drivers/net/qede/qede_if.h +++ b/drivers/net/qede/qede_if.h @@ -116,8 +116,7 @@ struct qed_common_ops { struct rte_pci_device *pci_dev, enum qed_protocol protocol, uint32_t dp_module, uint8_t dp_level, bool is_vf); - void (*set_id)(struct ecore_dev *edev, - char name[], const char ver_str[]); + void (*set_name)(struct ecore_dev *edev, char name[]); enum _ecore_status_t (*chain_alloc)(struct ecore_dev *edev, enum ecore_chain_use_mode diff --git a/drivers/net/qede/qede_main.c b/drivers/net/qede/qede_main.c index 1d4f336602..a932c5ff46 100644 --- a/drivers/net/qede/qede_main.c +++ b/drivers/net/qede/qede_main.c @@ -50,7 +50,9 @@ qed_probe(struct ecore_dev *edev, struct rte_pci_device *pci_dev, int rc; ecore_init_struct(edev); + edev->drv_type = DRV_ID_DRV_TYPE_LINUX; qdev->protocol = protocol; + if (is_vf) edev->b_is_vf = true; @@ -420,9 +422,7 @@ qed_fill_eth_dev_info(struct ecore_dev *edev, struct qed_dev_eth_info *info) return 0; } -static void -qed_set_id(struct ecore_dev *edev, char name[NAME_SIZE], - const char ver_str[NAME_SIZE]) +static void qed_set_name(struct ecore_dev *edev, char name[NAME_SIZE]) { int i; @@ -430,8 +430,6 @@ qed_set_id(struct ecore_dev *edev, char name[NAME_SIZE], for_each_hwfn(edev, i) { snprintf(edev->hwfns[i].name, NAME_SIZE, "%s-%d", name, i); } - memcpy(edev->ver_str, ver_str, NAME_SIZE); - edev->drv_type = DRV_ID_DRV_TYPE_LINUX; } static uint32_t @@ -714,7 +712,7 @@ const struct qed_common_ops qed_common_ops_pass = { INIT_STRUCT_FIELD(probe, &qed_probe), INIT_STRUCT_FIELD(update_pf_params, &qed_update_pf_params), INIT_STRUCT_FIELD(slowpath_start, &qed_slowpath_start), - INIT_STRUCT_FIELD(set_id, &qed_set_id), + INIT_STRUCT_FIELD(set_name, &qed_set_name), INIT_STRUCT_FIELD(chain_alloc, &ecore_chain_alloc), INIT_STRUCT_FIELD(chain_free, &ecore_chain_free), INIT_STRUCT_FIELD(sb_init, &qed_sb_init),