net/qede/base: fix to use a passed ptt handle
authorRasesh Mody <rasesh.mody@cavium.com>
Tue, 19 Sep 2017 01:29:50 +0000 (18:29 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 6 Oct 2017 00:49:48 +0000 (02:49 +0200)
Fix ecore_configure_vp_wfq_on_link_change() to use a provided ptt[PF
translation table] handle instead of directly using p_dpc_ptt

Fixes: ec94dbc57362 ("qede: add base driver")
Cc: stable@dpdk.org
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_mcp.c

index 64a3416..a3edcb0 100644 (file)
@@ -832,6 +832,7 @@ ecore_concrete_to_sw_fid(__rte_unused struct ecore_dev *p_dev, u32 concrete_fid)
 
 int ecore_configure_vport_wfq(struct ecore_dev *p_dev, u16 vp_id, u32 rate);
 void ecore_configure_vp_wfq_on_link_change(struct ecore_dev *p_dev,
+                                          struct ecore_ptt *p_ptt,
                                           u32 min_pf_rate);
 
 int ecore_configure_pf_max_bandwidth(struct ecore_dev *p_dev, u8 max_bw);
index 73949e8..01e20ac 100644 (file)
@@ -4903,6 +4903,7 @@ int ecore_configure_vport_wfq(struct ecore_dev *p_dev, u16 vp_id, u32 rate)
 
 /* API to configure WFQ from mcp link change */
 void ecore_configure_vp_wfq_on_link_change(struct ecore_dev *p_dev,
+                                          struct ecore_ptt *p_ptt,
                                           u32 min_pf_rate)
 {
        int i;
@@ -4917,8 +4918,7 @@ void ecore_configure_vp_wfq_on_link_change(struct ecore_dev *p_dev,
        for_each_hwfn(p_dev, i) {
                struct ecore_hwfn *p_hwfn = &p_dev->hwfns[i];
 
-               __ecore_configure_vp_wfq_on_link_change(p_hwfn,
-                                                       p_hwfn->p_dpc_ptt,
+               __ecore_configure_vp_wfq_on_link_change(p_hwfn, p_ptt,
                                                        min_pf_rate);
        }
 }
index 88c5ceb..cdb5cf2 100644 (file)
@@ -1116,7 +1116,7 @@ static void ecore_mcp_handle_link_change(struct ecore_hwfn *p_hwfn,
        /* Mintz bandwidth configuration */
        __ecore_configure_pf_min_bandwidth(p_hwfn, p_ptt,
                                           p_link, min_bw);
-       ecore_configure_vp_wfq_on_link_change(p_hwfn->p_dev,
+       ecore_configure_vp_wfq_on_link_change(p_hwfn->p_dev, p_ptt,
                                              p_link->min_pf_rate);
 
        p_link->an = !!(status & LINK_STATUS_AUTO_NEGOTIATE_ENABLED);