@@ -30,7 +30,7 @@
union ecore_mcp_protocol_stats;
enum ecore_hw_err_type;
-void qed_link_update(struct ecore_hwfn *hwfn, struct ecore_ptt *ptt);
+void qed_link_update(struct ecore_hwfn *hwfn);
#if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN
#undef __BIG_ENDIAN
@@ -338,7 +338,7 @@ void *osal_dma_alloc_coherent_aligned(struct ecore_dev *, dma_addr_t *,
#define OSAL_BITMAP_WEIGHT(bitmap, count) 0
-#define OSAL_LINK_UPDATE(hwfn, ptt) qed_link_update(hwfn, ptt)
+#define OSAL_LINK_UPDATE(hwfn) qed_link_update(hwfn)
#define OSAL_TRANSCEIVER_UPDATE(hwfn) nothing
#define OSAL_DCBX_AEN(hwfn, mib_type) nothing
@@ -1420,7 +1420,7 @@ static void ecore_mcp_handle_link_change(struct ecore_hwfn *p_hwfn,
if (p_hwfn->mcp_info->capabilities & FW_MB_PARAM_FEATURE_SUPPORT_EEE)
ecore_mcp_read_eee_config(p_hwfn, p_ptt, p_link);
- OSAL_LINK_UPDATE(p_hwfn, p_ptt);
+ OSAL_LINK_UPDATE(p_hwfn);
out:
OSAL_SPIN_UNLOCK(&p_hwfn->mcp_info->link_lock);
}
@@ -1159,6 +1159,9 @@ static int qede_dev_start(struct rte_eth_dev *eth_dev)
/* Bring-up the link */
qede_dev_set_link_state(eth_dev, true);
+ /* Update link status */
+ qede_link_update(eth_dev, 0);
+
/* Start/resume traffic */
qede_fastpath_start(edev);
@@ -1367,7 +1370,7 @@ static int qede_dev_configure(struct rte_eth_dev *eth_dev)
}
/* return 0 means link status changed, -1 means not changed */
-static int
+int
qede_link_update(struct rte_eth_dev *eth_dev, __rte_unused int wait_to_complete)
{
struct qede_dev *qdev = eth_dev->data->dev_private;
@@ -2625,6 +2628,7 @@ static int qede_common_dev_init(struct rte_eth_dev *eth_dev, bool is_vf)
/* Extract key data structures */
adapter = eth_dev->data->dev_private;
+ adapter->ethdev = eth_dev;
edev = &adapter->edev;
pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);
pci_addr = pci_dev->addr;
@@ -210,6 +210,7 @@ struct qede_dev {
struct qede_fdir_info fdir_info;
bool vlan_strip_flg;
char drv_ver[QEDE_PMD_DRV_VER_STR_SIZE];
+ void *ethdev;
};
/* Non-static functions */
@@ -226,6 +227,9 @@ int qed_fill_eth_dev_info(struct ecore_dev *edev,
struct qed_dev_eth_info *info);
int qede_dev_set_link_state(struct rte_eth_dev *eth_dev, bool link_up);
+int qede_link_update(struct rte_eth_dev *eth_dev,
+ __rte_unused int wait_to_complete);
+
int qede_dev_filter_ctrl(struct rte_eth_dev *dev, enum rte_filter_type type,
enum rte_filter_op op, void *arg);
@@ -179,7 +179,7 @@ static void qed_handle_bulletin_change(struct ecore_hwfn *hwfn)
rte_memcpy(hwfn->hw_info.hw_mac_addr, mac, ETH_ALEN);
/* Always update link configuration according to bulletin */
- qed_link_update(hwfn, NULL);
+ qed_link_update(hwfn);
}
static void qede_vf_task(void *arg)
@@ -629,11 +629,12 @@ static int qed_set_link(struct ecore_dev *edev, struct qed_link_params *params)
return rc;
}
-void qed_link_update(struct ecore_hwfn *hwfn, struct ecore_ptt *ptt)
+void qed_link_update(struct ecore_hwfn *hwfn)
{
- struct qed_link_output if_link;
+ struct ecore_dev *edev = hwfn->p_dev;
+ struct qede_dev *qdev = (struct qede_dev *)edev;
- qed_fill_link(hwfn, ptt, &if_link);
+ qede_link_update((struct rte_eth_dev *)qdev->ethdev, 0);
}
static int qed_drain(struct ecore_dev *edev)