net/hns3: support VXLAN-GPE TSO and checksum
[dpdk.git] / drivers / net / qede / qede_main.c
index aecb982..caa9d1d 100644 (file)
@@ -37,6 +37,7 @@ static void qed_init_pci(struct ecore_dev *edev, struct rte_pci_device *pci_dev)
        edev->regview = pci_dev->mem_resource[0].addr;
        edev->doorbells = pci_dev->mem_resource[2].addr;
        edev->db_size = pci_dev->mem_resource[2].len;
+       edev->pci_dev = pci_dev;
 }
 
 static int
@@ -220,7 +221,9 @@ static void qed_stop_iov_task(struct ecore_dev *edev)
 
        for_each_hwfn(edev, i) {
                p_hwfn = &edev->hwfns[i];
-               if (!IS_PF(edev))
+               if (IS_PF(edev))
+                       rte_eal_alarm_cancel(qed_iov_pf_task, p_hwfn);
+               else
                        rte_eal_alarm_cancel(qede_vf_task, p_hwfn);
        }
 }
@@ -584,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);
        }
@@ -648,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);
 }
 
@@ -820,6 +826,7 @@ const struct qed_common_ops qed_common_ops_pass = {
 const struct qed_eth_ops qed_eth_ops_pass = {
        INIT_STRUCT_FIELD(common, &qed_common_ops_pass),
        INIT_STRUCT_FIELD(fill_dev_info, &qed_fill_eth_dev_info),
+       INIT_STRUCT_FIELD(sriov_configure, &qed_sriov_configure),
 };
 
 const struct qed_eth_ops *qed_get_eth_ops(void)