X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fqede%2Fbase%2Fecore_dev.c;h=b183519b54d7689f38a1adfc6728d24f05414b2e;hb=8e950a86912d40e2621699a59ffdfd88b345a99a;hp=cf454b19bb326e412bd2d3c79bc369ab9e41bdb1;hpb=3eed444a9621026ae8a28d2d9ca1b0aff4aae8bd;p=dpdk.git diff --git a/drivers/net/qede/base/ecore_dev.c b/drivers/net/qede/base/ecore_dev.c index cf454b19bb..b183519b54 100644 --- a/drivers/net/qede/base/ecore_dev.c +++ b/drivers/net/qede/base/ecore_dev.c @@ -2291,18 +2291,21 @@ enum _ecore_status_t ecore_qm_reconf(struct ecore_hwfn *p_hwfn, { struct ecore_qm_info *qm_info = &p_hwfn->qm_info; bool b_rc; - enum _ecore_status_t rc; + enum _ecore_status_t rc = ECORE_SUCCESS; + + /* multiple flows can issue qm reconf. Need to lock */ + OSAL_SPIN_LOCK(&qm_lock); /* initialize ecore's qm data structure */ ecore_init_qm_info(p_hwfn); /* stop PF's qm queues */ - OSAL_SPIN_LOCK(&qm_lock); b_rc = ecore_send_qm_stop_cmd(p_hwfn, p_ptt, false, true, qm_info->start_pq, qm_info->num_pqs); - OSAL_SPIN_UNLOCK(&qm_lock); - if (!b_rc) - return ECORE_INVAL; + if (!b_rc) { + rc = ECORE_INVAL; + goto unlock; + } /* clear the QM_PF runtime phase leftovers from previous init */ ecore_init_clear_rt_data(p_hwfn); @@ -2313,18 +2316,17 @@ enum _ecore_status_t ecore_qm_reconf(struct ecore_hwfn *p_hwfn, /* activate init tool on runtime array */ rc = ecore_init_run(p_hwfn, p_ptt, PHASE_QM_PF, p_hwfn->rel_pf_id, p_hwfn->hw_info.hw_mode); - if (rc != ECORE_SUCCESS) - return rc; /* start PF's qm queues */ - OSAL_SPIN_LOCK(&qm_lock); b_rc = ecore_send_qm_stop_cmd(p_hwfn, p_ptt, true, true, qm_info->start_pq, qm_info->num_pqs); - OSAL_SPIN_UNLOCK(&qm_lock); if (!b_rc) - return ECORE_INVAL; + rc = ECORE_INVAL; - return ECORE_SUCCESS; +unlock: + OSAL_SPIN_UNLOCK(&qm_lock); + + return rc; } static enum _ecore_status_t ecore_alloc_qm_data(struct ecore_hwfn *p_hwfn) @@ -3429,6 +3431,14 @@ ecore_hw_init_pf(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt, if (rc != ECORE_SUCCESS) return rc; + /* Use the leading hwfn since in CMT only NIG #0 is operational */ + if (IS_LEAD_HWFN(p_hwfn)) { + rc = ecore_llh_hw_init_pf(p_hwfn, p_ptt, + p_params->avoid_eng_affin); + if (rc) + return rc; + } + if (p_params->b_hw_start) { /* enable interrupts */ rc = ecore_int_igu_enable(p_hwfn, p_ptt, p_params->int_mode);