examples/ipsec-secgw: fix session mempool initialisation
[dpdk.git] / drivers / net / qede / qede_main.c
index 6a7bfc1..caa9d1d 100644 (file)
@@ -587,13 +587,12 @@ qed_get_current_link(struct ecore_dev *edev, struct qed_link_output *if_link)
        hwfn = &edev->hwfns[0];
        if (IS_PF(edev)) {
                ptt = ecore_ptt_acquire(hwfn);
-               if (!ptt)
-                       DP_NOTICE(hwfn, true, "Failed to fill link; No PTT\n");
-
+               if (ptt) {
                        qed_fill_link(hwfn, ptt, if_link);
-
-               if (ptt)
                        ecore_ptt_release(hwfn, ptt);
+               } else {
+                       DP_NOTICE(hwfn, true, "Failed to fill link; No PTT\n");
+               }
        } else {
                qed_fill_link(hwfn, NULL, if_link);
        }
@@ -651,8 +650,12 @@ void qed_link_update(struct ecore_hwfn *hwfn)
        struct ecore_dev *edev = hwfn->p_dev;
        struct qede_dev *qdev = (struct qede_dev *)edev;
        struct rte_eth_dev *dev = (struct rte_eth_dev *)qdev->ethdev;
+       int rc;
+
+       rc = qede_link_update(dev, 0);
+       qed_inform_vf_link_state(hwfn);
 
-       if (!qede_link_update(dev, 0))
+       if (!rc)
                rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 }