Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/16265/?format=api
https://patches.dpdk.org/api/patches/16265/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1475219169-8774-6-git-send-email-rasesh.mody@qlogic.com/", "project": { "id": 1, "url": "https://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<1475219169-8774-6-git-send-email-rasesh.mody@qlogic.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1475219169-8774-6-git-send-email-rasesh.mody@qlogic.com", "date": "2016-09-30T07:05:52", "name": "[dpdk-dev,v2,05/22] qede/base: add the driver support for the MFW crash dump", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "b724f60e8bc377a1d18d6b6e9bbee6fef281610c", "submitter": { "id": 325, "url": "https://patches.dpdk.org/api/people/325/?format=api", "name": "Rasesh Mody", "email": "rasesh.mody@qlogic.com" }, "delegate": { "id": 10, "url": "https://patches.dpdk.org/api/users/10/?format=api", "username": "bruce", "first_name": "Bruce", "last_name": "Richardson", "email": "bruce.richardson@intel.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/1475219169-8774-6-git-send-email-rasesh.mody@qlogic.com/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/16265/comments/", "check": "pending", "checks": "https://patches.dpdk.org/api/patches/16265/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 8E5C0592F;\n\tFri, 30 Sep 2016 09:06:38 +0200 (CEST)", "from mx0b-0016ce01.pphosted.com (mx0b-0016ce01.pphosted.com\n\t[67.231.156.153]) by dpdk.org (Postfix) with ESMTP id 2A850592F\n\tfor <dev@dpdk.org>; Fri, 30 Sep 2016 09:06:36 +0200 (CEST)", "from pps.filterd (m0085408.ppops.net [127.0.0.1])\n\tby mx0b-0016ce01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id\n\tu8U76GuQ021374 for <dev@dpdk.org>; Fri, 30 Sep 2016 00:06:35 -0700", "from avcashub1.qlogic.com ([198.186.0.115])\n\tby mx0b-0016ce01.pphosted.com with ESMTP id 25s5nvu6c2-1\n\t(version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT)\n\tfor <dev@dpdk.org>; Fri, 30 Sep 2016 00:06:35 -0700", "from avluser05.qlc.com (10.1.113.115) by avcashub1.qlogic.org\n\t(10.1.4.190) with Microsoft SMTP Server (TLS) id 14.3.235.1;\n\tFri, 30 Sep 2016 00:06:34 -0700", "(from rmody@localhost)\tby avluser05.qlc.com (8.14.4/8.14.4/Submit)\n\tid u8U76YFT008851;\tFri, 30 Sep 2016 00:06:34 -0700" ], "X-Authentication-Warning": "avluser05.qlc.com: rmody set sender to\n\trasesh.mody@qlogic.com using -f", "From": "Rasesh Mody <rasesh.mody@qlogic.com>", "To": "<dev@dpdk.org>", "CC": "<Dept-EngDPDKDev@qlogic.com>, Rasesh Mody <rasesh.mody@qlogic.com>", "Date": "Fri, 30 Sep 2016 00:05:52 -0700", "Message-ID": "<1475219169-8774-6-git-send-email-rasesh.mody@qlogic.com>", "X-Mailer": "git-send-email 1.7.10.3", "In-Reply-To": "<1475219169-8774-1-git-send-email-rasesh.mody@qlogic.com>", "References": "<1475219169-8774-1-git-send-email-rasesh.mody@qlogic.com>", "MIME-Version": "1.0", "Content-Type": "text/plain", "disclaimer": "bypass", "X-Proofpoint-Virus-Version": "vendor=nai engine=5800 definitions=8303\n\tsignatures=670713", "X-Proofpoint-Spam-Details": "rule=notspam policy=default score=0\n\tpriorityscore=1501 malwarescore=0\n\tsuspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015\n\tlowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam\n\tadjust=0\n\treason=mlx scancount=1 engine=8.0.1-1609280000\n\tdefinitions=main-1609300128", "Subject": "[dpdk-dev] [PATCH v2 05/22] qede/base: add the driver support for\n\tthe MFW crash dump", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "patches and discussions about DPDK <dev.dpdk.org>", "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://dpdk.org/ml/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "Add support for MFW crash dump collection to the qede pmd.\n\nSigned-off-by: Rasesh Mody <rasesh.mody@qlogic.com>\n---\n drivers/net/qede/base/ecore.h | 3 +\n drivers/net/qede/base/ecore_dev.c | 22 ++---\n drivers/net/qede/base/ecore_dev_api.h | 29 ++++---\n drivers/net/qede/base/ecore_mcp.c | 151 ++++++++++++++++++++++++++++++++++\n drivers/net/qede/base/ecore_mcp.h | 44 ++++++++++\n drivers/net/qede/base/ecore_mcp_api.h | 10 +++\n drivers/net/qede/qede_main.c | 17 ++--\n 7 files changed, 248 insertions(+), 28 deletions(-)", "diff": "diff --git a/drivers/net/qede/base/ecore.h b/drivers/net/qede/base/ecore.h\nindex 5394c00..4359343 100644\n--- a/drivers/net/qede/base/ecore.h\n+++ b/drivers/net/qede/base/ecore.h\n@@ -738,6 +738,9 @@ struct ecore_dev {\n \n \tbool\t\t\t\tattn_clr_en;\n \n+\t/* Indicates whether allowing the MFW to collect a crash dump */\n+\tbool\t\t\t\tmdump_en;\n+\n \t/* Indicates if the reg_fifo is checked after any register access */\n \tbool\t\t\t\tchk_reg_fifo;\n \ndiff --git a/drivers/net/qede/base/ecore_dev.c b/drivers/net/qede/base/ecore_dev.c\nindex 8124373..c530934 100644\n--- a/drivers/net/qede/base/ecore_dev.c\n+++ b/drivers/net/qede/base/ecore_dev.c\n@@ -1621,24 +1621,20 @@ static void ecore_reset_mb_shadow(struct ecore_hwfn *p_hwfn,\n }\n \n enum _ecore_status_t ecore_hw_init(struct ecore_dev *p_dev,\n-\t\t\t\t struct ecore_tunn_start_params *p_tunn,\n-\t\t\t\t bool b_hw_start,\n-\t\t\t\t enum ecore_int_mode int_mode,\n-\t\t\t\t bool allow_npar_tx_switch,\n-\t\t\t\t const u8 *bin_fw_data)\n+\t\t\t\t struct ecore_hw_init_params *p_params)\n {\n \tenum _ecore_status_t rc, mfw_rc;\n \tu32 load_code, param;\n \tint i, j;\n \n-\tif ((int_mode == ECORE_INT_MODE_MSI) && (p_dev->num_hwfns > 1)) {\n+\tif (p_params->int_mode == ECORE_INT_MODE_MSI && p_dev->num_hwfns > 1) {\n \t\tDP_NOTICE(p_dev, false,\n \t\t\t \"MSI mode is not supported for CMT devices\\n\");\n \t\treturn ECORE_INVAL;\n \t}\n \n \tif (IS_PF(p_dev)) {\n-\t\trc = ecore_init_fw_data(p_dev, bin_fw_data);\n+\t\trc = ecore_init_fw_data(p_dev, p_params->bin_fw_data);\n \t\tif (rc != ECORE_SUCCESS)\n \t\t\treturn rc;\n \t}\n@@ -1735,9 +1731,11 @@ enum _ecore_status_t ecore_hw_init(struct ecore_dev *p_dev,\n \t\t\t/* Fall into */\n \t\tcase FW_MSG_CODE_DRV_LOAD_FUNCTION:\n \t\t\trc = ecore_hw_init_pf(p_hwfn, p_hwfn->p_main_ptt,\n-\t\t\t\t\t p_tunn, p_hwfn->hw_info.hw_mode,\n-\t\t\t\t\t b_hw_start, int_mode,\n-\t\t\t\t\t allow_npar_tx_switch);\n+\t\t\t\t\t p_params->p_tunn,\n+\t\t\t\t\t p_hwfn->hw_info.hw_mode,\n+\t\t\t\t\t p_params->b_hw_start,\n+\t\t\t\t\t p_params->int_mode,\n+\t\t\t\t\t p_params->allow_npar_tx_switch);\n \t\t\tbreak;\n \t\tdefault:\n \t\t\trc = ECORE_NOTIMPL;\n@@ -1761,6 +1759,10 @@ enum _ecore_status_t ecore_hw_init(struct ecore_dev *p_dev,\n \t\t\treturn mfw_rc;\n \t\t}\n \n+\t\tecore_mcp_mdump_get_info(p_hwfn, p_hwfn->p_main_ptt);\n+\t\tecore_mcp_mdump_set_values(p_hwfn, p_hwfn->p_main_ptt,\n+\t\t\t\t\t p_params->epoch);\n+\n \t\t/* send DCBX attention request command */\n \t\tDP_VERBOSE(p_hwfn, ECORE_MSG_DCB,\n \t\t\t \"sending phony dcbx set command to trigger DCBx attention handling\\n\");\ndiff --git a/drivers/net/qede/base/ecore_dev_api.h b/drivers/net/qede/base/ecore_dev_api.h\nindex 1a810b5..042c0af 100644\n--- a/drivers/net/qede/base/ecore_dev_api.h\n+++ b/drivers/net/qede/base/ecore_dev_api.h\n@@ -57,26 +57,31 @@ enum _ecore_status_t ecore_resc_alloc(struct ecore_dev *p_dev);\n */\n void ecore_resc_setup(struct ecore_dev *p_dev);\n \n+struct ecore_hw_init_params {\n+\t/* tunnelling parameters */\n+\tstruct ecore_tunn_start_params *p_tunn;\n+\tbool b_hw_start;\n+\t/* interrupt mode [msix, inta, etc.] to use */\n+\tenum ecore_int_mode int_mode;\n+/* npar tx switching to be used for vports configured for tx-switching */\n+\n+\tbool allow_npar_tx_switch;\n+\t/* binary fw data pointer in binary fw file */\n+\tconst u8 *bin_fw_data;\n+\t/* the OS Epoch time in seconds */\n+\tu32 epoch;\n+};\n+\n /**\n * @brief ecore_hw_init -\n *\n * @param p_dev\n- * @param p_tunn - tunneling parameters\n- * @param b_hw_start\n- * @param int_mode - interrupt mode [msix, inta, etc.] to use.\n- * @param allow_npar_tx_switch - npar tx switching to be used\n- *\t for vports configured for tx-switching.\n- * @param bin_fw_data - binary fw data pointer in binary fw file.\n- *\t\t\tPass NULL if not using binary fw file.\n+ * @param p_params\n *\n * @return enum _ecore_status_t\n */\n enum _ecore_status_t ecore_hw_init(struct ecore_dev *p_dev,\n-\t\t\t\t struct ecore_tunn_start_params *p_tunn,\n-\t\t\t\t bool b_hw_start,\n-\t\t\t\t enum ecore_int_mode int_mode,\n-\t\t\t\t bool allow_npar_tx_switch,\n-\t\t\t\t const u8 *bin_fw_data);\n+\t\t\t\t struct ecore_hw_init_params *p_params);\n \n /**\n * @brief ecore_hw_timers_stop_all -\ndiff --git a/drivers/net/qede/base/ecore_mcp.c b/drivers/net/qede/base/ecore_mcp.c\nindex cf67fa1..500368e 100644\n--- a/drivers/net/qede/base/ecore_mcp.c\n+++ b/drivers/net/qede/base/ecore_mcp.c\n@@ -1043,6 +1043,154 @@ static void ecore_mcp_handle_fan_failure(struct ecore_hwfn *p_hwfn,\n \tecore_hw_err_notify(p_hwfn, ECORE_HW_ERR_FAN_FAIL);\n }\n \n+static enum _ecore_status_t\n+ecore_mcp_mdump_cmd(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,\n+\t\t u32 mdump_cmd, union drv_union_data *p_data_src,\n+\t\t union drv_union_data *p_data_dst, u32 *p_mcp_resp)\n+{\n+\tstruct ecore_mcp_mb_params mb_params;\n+\tenum _ecore_status_t rc;\n+\n+\tOSAL_MEM_ZERO(&mb_params, sizeof(mb_params));\n+\tmb_params.cmd = DRV_MSG_CODE_MDUMP_CMD;\n+\tmb_params.param = mdump_cmd;\n+\tmb_params.p_data_src = p_data_src;\n+\tmb_params.p_data_dst = p_data_dst;\n+\trc = ecore_mcp_cmd_and_union(p_hwfn, p_ptt, &mb_params);\n+\tif (rc != ECORE_SUCCESS)\n+\t\treturn rc;\n+\n+\t*p_mcp_resp = mb_params.mcp_resp;\n+\tif (*p_mcp_resp == FW_MSG_CODE_MDUMP_INVALID_CMD) {\n+\t\tDP_NOTICE(p_hwfn, false,\n+\t\t\t \"MFW claims that the mdump command is illegal [mdump_cmd 0x%x]\\n\",\n+\t\t\t mdump_cmd);\n+\t\trc = ECORE_INVAL;\n+\t}\n+\n+\treturn rc;\n+}\n+\n+static enum _ecore_status_t ecore_mcp_mdump_ack(struct ecore_hwfn *p_hwfn,\n+\t\t\t\t\t\tstruct ecore_ptt *p_ptt)\n+{\n+\tu32 mcp_resp;\n+\n+\treturn ecore_mcp_mdump_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_MDUMP_ACK,\n+\t\t\t\t OSAL_NULL, OSAL_NULL, &mcp_resp);\n+}\n+\n+enum _ecore_status_t ecore_mcp_mdump_set_values(struct ecore_hwfn *p_hwfn,\n+\t\t\t\t\t\tstruct ecore_ptt *p_ptt,\n+\t\t\t\t\t\tu32 epoch)\n+{\n+\tunion drv_union_data union_data;\n+\tu32 mcp_resp;\n+\n+\tOSAL_MEMCPY(&union_data.raw_data, &epoch, sizeof(epoch));\n+\n+\treturn ecore_mcp_mdump_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_MDUMP_SET_VALUES,\n+\t\t\t\t &union_data, OSAL_NULL, &mcp_resp);\n+}\n+\n+enum _ecore_status_t ecore_mcp_mdump_trigger(struct ecore_hwfn *p_hwfn,\n+\t\t\t\t\t struct ecore_ptt *p_ptt)\n+{\n+\tu32 mcp_resp;\n+\n+\treturn ecore_mcp_mdump_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_MDUMP_TRIGGER,\n+\t\t\t\t OSAL_NULL, OSAL_NULL, &mcp_resp);\n+}\n+\n+enum _ecore_status_t ecore_mcp_mdump_clear_logs(struct ecore_hwfn *p_hwfn,\n+\t\t\t\t\t\tstruct ecore_ptt *p_ptt)\n+{\n+\tu32 mcp_resp;\n+\n+\treturn ecore_mcp_mdump_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_MDUMP_CLEAR_LOGS,\n+\t\t\t\t OSAL_NULL, OSAL_NULL, &mcp_resp);\n+}\n+\n+static enum _ecore_status_t\n+ecore_mcp_mdump_get_config(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,\n+\t\t\t struct mdump_config_stc *p_mdump_config)\n+{\n+\tunion drv_union_data union_data;\n+\tu32 mcp_resp;\n+\tenum _ecore_status_t rc;\n+\n+\trc = ecore_mcp_mdump_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_MDUMP_GET_CONFIG,\n+\t\t\t\t OSAL_NULL, &union_data, &mcp_resp);\n+\tif (rc != ECORE_SUCCESS)\n+\t\treturn rc;\n+\n+\t/* A zero response implies that the mdump command is not supported */\n+\tif (!mcp_resp)\n+\t\treturn ECORE_NOTIMPL;\n+\n+\tif (mcp_resp != FW_MSG_CODE_OK) {\n+\t\tDP_NOTICE(p_hwfn, false,\n+\t\t\t \"Failed to get the mdump configuration and logs info [mcp_resp 0x%x]\\n\",\n+\t\t\t mcp_resp);\n+\t\trc = ECORE_UNKNOWN_ERROR;\n+\t}\n+\n+\tOSAL_MEMCPY(p_mdump_config, &union_data.mdump_config,\n+\t\t sizeof(*p_mdump_config));\n+\n+\treturn rc;\n+}\n+\n+enum _ecore_status_t ecore_mcp_mdump_get_info(struct ecore_hwfn *p_hwfn,\n+\t\t\t\t\t struct ecore_ptt *p_ptt)\n+{\n+\tstruct mdump_config_stc mdump_config;\n+\tenum _ecore_status_t rc;\n+\n+\trc = ecore_mcp_mdump_get_config(p_hwfn, p_ptt, &mdump_config);\n+\tif (rc != ECORE_SUCCESS)\n+\t\treturn rc;\n+\n+\tDP_VERBOSE(p_hwfn, ECORE_MSG_SP,\n+\t\t \"MFW mdump_config: version 0x%x, config 0x%x, epoch 0x%x, num_of_logs 0x%x, valid_logs 0x%x\\n\",\n+\t\t mdump_config.version, mdump_config.config, mdump_config.epoc,\n+\t\t mdump_config.num_of_logs, mdump_config.valid_logs);\n+\n+\tif (mdump_config.valid_logs > 0) {\n+\t\tDP_NOTICE(p_hwfn, false,\n+\t\t\t \"* * * IMPORTANT - HW ERROR register dump captured by device * * *\\n\");\n+\t}\n+\n+\treturn rc;\n+}\n+\n+void ecore_mcp_mdump_enable(struct ecore_dev *p_dev, bool mdump_enable)\n+{\n+\tp_dev->mdump_en = mdump_enable;\n+}\n+\n+static void ecore_mcp_handle_critical_error(struct ecore_hwfn *p_hwfn,\n+\t\t\t\t\t struct ecore_ptt *p_ptt)\n+{\n+\t/* In CMT mode - no need for more than a single acknowledgment to the\n+\t * MFW, and no more than a single notification to the upper driver.\n+\t */\n+\tif (p_hwfn != ECORE_LEADING_HWFN(p_hwfn->p_dev))\n+\t\treturn;\n+\n+\tDP_NOTICE(p_hwfn, false,\n+\t\t \"Received a critical error notification from the MFW!\\n\");\n+\n+\tif (p_hwfn->p_dev->mdump_en) {\n+\t\tDP_NOTICE(p_hwfn, false,\n+\t\t\t \"Not acknowledging the notification to allow the MFW crash dump\\n\");\n+\t\treturn;\n+\t}\n+\n+\tecore_mcp_mdump_ack(p_hwfn, p_ptt);\n+\tecore_hw_err_notify(p_hwfn, ECORE_HW_ERR_HW_ATTN);\n+}\n+\n enum _ecore_status_t ecore_mcp_handle_events(struct ecore_hwfn *p_hwfn,\n \t\t\t\t\t struct ecore_ptt *p_ptt)\n {\n@@ -1104,6 +1252,9 @@ enum _ecore_status_t ecore_mcp_handle_events(struct ecore_hwfn *p_hwfn,\n \t\tcase MFW_DRV_MSG_FAILURE_DETECTED:\n \t\t\tecore_mcp_handle_fan_failure(p_hwfn, p_ptt);\n \t\t\tbreak;\n+\t\tcase MFW_DRV_MSG_CRITICAL_ERROR_OCCURRED:\n+\t\t\tecore_mcp_handle_critical_error(p_hwfn, p_ptt);\n+\t\t\tbreak;\n \t\tdefault:\n \t\t\t/* @DPDK */\n \t\t\tDP_NOTICE(p_hwfn, false,\ndiff --git a/drivers/net/qede/base/ecore_mcp.h b/drivers/net/qede/base/ecore_mcp.h\nindex aa41533..2fc503a 100644\n--- a/drivers/net/qede/base/ecore_mcp.h\n+++ b/drivers/net/qede/base/ecore_mcp.h\n@@ -308,6 +308,50 @@ enum _ecore_status_t ecore_hw_init_first_eth(struct ecore_hwfn *p_hwfn,\n \t\t\t\t\t struct ecore_ptt *p_ptt,\n \t\t\t\t\t u8 *p_pf);\n #endif\n+/**\n+ * @brief - Sends crash mdump related info to the MFW.\n+ *\n+ * @param p_hwfn\n+ * @param p_ptt\n+ *\n+ * @param return ECORE_SUCCESS upon success.\n+ */\n+enum _ecore_status_t ecore_mcp_mdump_set_values(struct ecore_hwfn *p_hwfn,\n+\t\t\t\t\t\tstruct ecore_ptt *p_ptt,\n+\t\t\t\t\t\tu32 epoch);\n+\n+/**\n+ * @brief - Triggers a MFW crash dump procedure.\n+ *\n+ * @param p_hwfn\n+ * @param p_ptt\n+ *\n+ * @param return ECORE_SUCCESS upon success.\n+ */\n+enum _ecore_status_t ecore_mcp_mdump_trigger(struct ecore_hwfn *p_hwfn,\n+\t\t\t\t\t struct ecore_ptt *p_ptt);\n+\n+/**\n+ * @brief - Clears the MFW crash dump logs.\n+ *\n+ * @param p_hwfn\n+ * @param p_ptt\n+ *\n+ * @param return ECORE_SUCCESS upon success.\n+ */\n+enum _ecore_status_t ecore_mcp_mdump_clear_logs(struct ecore_hwfn *p_hwfn,\n+\t\t\t\t\t\tstruct ecore_ptt *p_ptt);\n+\n+/**\n+ * @brief - Gets the MFW crash dump configuration and logs info.\n+ *\n+ * @param p_hwfn\n+ * @param p_ptt\n+ *\n+ * @param return ECORE_SUCCESS upon success.\n+ */\n+enum _ecore_status_t ecore_mcp_mdump_get_info(struct ecore_hwfn *p_hwfn,\n+\t\t\t\t\t struct ecore_ptt *p_ptt);\n \n enum _ecore_status_t ecore_mcp_get_resc_info(struct ecore_hwfn *p_hwfn,\n \t\t\t\t\t struct ecore_ptt *p_ptt,\ndiff --git a/drivers/net/qede/base/ecore_mcp_api.h b/drivers/net/qede/base/ecore_mcp_api.h\nindex ff4f1ca..c26b494 100644\n--- a/drivers/net/qede/base/ecore_mcp_api.h\n+++ b/drivers/net/qede/base/ecore_mcp_api.h\n@@ -792,4 +792,14 @@ enum _ecore_status_t ecore_mcp_mem_ecc_events(struct ecore_hwfn *p_hwfn,\n \t\t\t\t\t struct ecore_ptt *p_ptt,\n \t\t\t\t\t u64 *num_events);\n \n+/**\n+ * @brief Sets whether a critical error notification from the MFW is acked, or\n+ * is it being ignored and thus allowing the MFW crash dump.\n+ *\n+ * @param p_dev\n+ * @param mdump_enable\n+ *\n+ */\n+void ecore_mcp_mdump_enable(struct ecore_dev *p_dev, bool mdump_enable);\n+\n #endif\ndiff --git a/drivers/net/qede/qede_main.c b/drivers/net/qede/qede_main.c\nindex e4ef4f0..60655b7 100644\n--- a/drivers/net/qede/qede_main.c\n+++ b/drivers/net/qede/qede_main.c\n@@ -7,6 +7,7 @@\n */\n \n #include <limits.h>\n+#include <time.h>\n #include <rte_alarm.h>\n \n #include \"qede_ethdev.h\"\n@@ -221,6 +222,7 @@ static int qed_slowpath_start(struct ecore_dev *edev,\n \tconst uint8_t *data = NULL;\n \tstruct ecore_hwfn *hwfn;\n \tstruct ecore_mcp_drv_version drv_version;\n+\tstruct ecore_hw_init_params hw_init_params;\n \tstruct qede_dev *qdev = (struct qede_dev *)edev;\n \tint rc;\n #ifdef QED_ENC_SUPPORTED\n@@ -259,7 +261,6 @@ static int qed_slowpath_start(struct ecore_dev *edev,\n \tqed_start_iov_task(edev);\n #endif\n \n-\t/* Start the slowpath */\n #ifdef CONFIG_ECORE_BINARY_FW\n \tif (IS_PF(edev))\n \t\tdata = (const uint8_t *)edev->firmware + sizeof(u32);\n@@ -267,6 +268,8 @@ static int qed_slowpath_start(struct ecore_dev *edev,\n \n \tallow_npar_tx_switching = npar_tx_switching ? true : false;\n \n+\t/* Start the slowpath */\n+\tmemset(&hw_init_params, 0, sizeof(hw_init_params));\n #ifdef QED_ENC_SUPPORTED\n \tmemset(&tunn_info, 0, sizeof(tunn_info));\n \ttunn_info.tunn_mode |= 1 << QED_MODE_VXLAN_TUNN |\n@@ -276,12 +279,14 @@ static int qed_slowpath_start(struct ecore_dev *edev,\n \ttunn_info.tunn_clss_vxlan = QED_TUNN_CLSS_MAC_VLAN;\n \ttunn_info.tunn_clss_l2gre = QED_TUNN_CLSS_MAC_VLAN;\n \ttunn_info.tunn_clss_ipgre = QED_TUNN_CLSS_MAC_VLAN;\n-\trc = ecore_hw_init(edev, &tunn_info, true, ECORE_INT_MODE_MSIX,\n-\t\t\t allow_npar_tx_switching, data);\n-#else\n-\trc = ecore_hw_init(edev, NULL, true, ECORE_INT_MODE_MSIX,\n-\t\t\t allow_npar_tx_switching, data);\n+\thw_init_params.p_tunn = &tunn_info;\n #endif\n+\thw_init_params.b_hw_start = true;\n+\thw_init_params.int_mode = ECORE_INT_MODE_MSIX;\n+\thw_init_params.allow_npar_tx_switch = allow_npar_tx_switching;\n+\thw_init_params.bin_fw_data = data;\n+\thw_init_params.epoch = (u32)time(NULL);\n+\trc = ecore_hw_init(edev, &hw_init_params);\n \tif (rc) {\n \t\tDP_ERR(edev, \"ecore_hw_init failed\\n\");\n \t\tgoto err2;\n", "prefixes": [ "dpdk-dev", "v2", "05/22" ] }{ "id": 16265, "url": "