net/qede: set mdump flag
authorRasesh Mody <rasesh.mody@cavium.com>
Sat, 1 Jul 2017 19:30:00 +0000 (12:30 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 6 Jul 2017 13:00:57 +0000 (15:00 +0200)
Set allow management FW dump flag during HW prepare.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
drivers/net/qede/base/ecore.h
drivers/net/qede/base/ecore_dev.c
drivers/net/qede/base/ecore_dev_api.h
drivers/net/qede/base/ecore_mcp.c
drivers/net/qede/qede_main.c

index d92988e..0d68a9b 100644 (file)
@@ -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;
index 138b986..4cfa668 100644 (file)
@@ -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;
index e64a768..886407b 100644 (file)
@@ -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.
index a834ac7..03cc901 100644 (file)
@@ -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;
        }
 
index 01584f8..a6ff7af 100644 (file)
@@ -60,6 +60,7 @@ qed_probe(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) {