From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasesh Mody Subject: [PATCH 6/9] net/qede: set mdump flag Date: Thu, 29 Jun 2017 02:51:26 -0700 Message-ID: <1498729889-21524-7-git-send-email-rasesh.mody@cavium.com> References: <1498729889-21524-1-git-send-email-rasesh.mody@cavium.com> Mime-Version: 1.0 Content-Type: text/plain Cc: Rasesh Mody , To: Return-path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0053.outbound.protection.outlook.com [104.47.37.53]) by dpdk.org (Postfix) with ESMTP id 8B2385587 for ; Thu, 29 Jun 2017 11:52:03 +0200 (CEST) In-Reply-To: <1498729889-21524-1-git-send-email-rasesh.mody@cavium.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Set allow management FW dump flag during HW prepare. Signed-off-by: Rasesh Mody --- drivers/net/qede/base/ecore.h | 2 +- drivers/net/qede/base/ecore_dev.c | 1 + drivers/net/qede/base/ecore_dev_api.h | 3 +++ drivers/net/qede/base/ecore_mcp.c | 3 +-- drivers/net/qede/qede_main.c | 1 + 5 files changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/net/qede/base/ecore.h b/drivers/net/qede/base/ecore.h index d92988e..0d68a9b 100644 --- a/drivers/net/qede/base/ecore.h +++ b/drivers/net/qede/base/ecore.h @@ -770,7 +770,7 @@ struct ecore_dev { bool attn_clr_en; /* Indicates whether allowing the MFW to collect a crash dump */ - bool mdump_en; + bool allow_mdump; /* Indicates if the reg_fifo is checked after any register access */ bool chk_reg_fifo; diff --git a/drivers/net/qede/base/ecore_dev.c b/drivers/net/qede/base/ecore_dev.c index 138b986..4cfa668 100644 --- a/drivers/net/qede/base/ecore_dev.c +++ b/drivers/net/qede/base/ecore_dev.c @@ -3565,6 +3565,7 @@ enum _ecore_status_t ecore_hw_prepare(struct ecore_dev *p_dev, enum _ecore_status_t rc; p_dev->chk_reg_fifo = p_params->chk_reg_fifo; + p_dev->allow_mdump = p_params->allow_mdump; if (p_params->b_relaxed_probe) p_params->p_relaxed_res = ECORE_HW_PREPARE_SUCCESS; diff --git a/drivers/net/qede/base/ecore_dev_api.h b/drivers/net/qede/base/ecore_dev_api.h index e64a768..886407b 100644 --- a/drivers/net/qede/base/ecore_dev_api.h +++ b/drivers/net/qede/base/ecore_dev_api.h @@ -186,6 +186,9 @@ struct ecore_hw_prepare_params { /* The OS Epoch time in seconds */ u32 epoch; + /* Allow the MFW to collect a crash dump */ + bool allow_mdump; + /* Allow prepare to pass even if some initializations are failing. * If set, the `p_prepare_res' field would be set with the return, * and might allow probe to pass even if there are certain issues. diff --git a/drivers/net/qede/base/ecore_mcp.c b/drivers/net/qede/base/ecore_mcp.c index a834ac7..03cc901 100644 --- a/drivers/net/qede/base/ecore_mcp.c +++ b/drivers/net/qede/base/ecore_mcp.c @@ -1556,10 +1556,9 @@ static void ecore_mcp_handle_critical_error(struct ecore_hwfn *p_hwfn, DP_NOTICE(p_hwfn, false, "Received a critical error notification from the MFW!\n"); - if (p_hwfn->p_dev->mdump_en) { + if (p_hwfn->p_dev->allow_mdump) { DP_NOTICE(p_hwfn, false, "Not acknowledging the notification to allow the MFW crash dump\n"); - p_hwfn->p_dev->mdump_en = false; return; } diff --git a/drivers/net/qede/qede_main.c b/drivers/net/qede/qede_main.c index 01584f8..a6ff7af 100644 --- a/drivers/net/qede/qede_main.c +++ b/drivers/net/qede/qede_main.c @@ -60,6 +60,7 @@ static void qed_init_pci(struct ecore_dev *edev, struct rte_pci_device *pci_dev) hw_prepare_params.drv_resc_alloc = false; hw_prepare_params.chk_reg_fifo = false; hw_prepare_params.initiate_pf_flr = true; + hw_prepare_params.allow_mdump = false; hw_prepare_params.epoch = (u32)time(NULL); rc = ecore_hw_prepare(edev, &hw_prepare_params); if (rc) { -- 1.7.10.3