|
|
@@ -26,7 +26,7 @@ Signed-off-by: Robert Marko <[email protected]>
|
|
|
|
|
|
--- a/include/nss_dp_dev.h
|
|
|
+++ b/include/nss_dp_dev.h
|
|
|
-@@ -202,13 +202,10 @@ struct nss_dp_dev {
|
|
|
+@@ -225,13 +225,10 @@ struct nss_dp_dev {
|
|
|
unsigned long drv_flags; /* Driver specific feature flags */
|
|
|
|
|
|
/* Phy related stuff */
|
|
|
@@ -43,7 +43,7 @@ Signed-off-by: Robert Marko <[email protected]>
|
|
|
|
|
|
--- a/nss_dp_main.c
|
|
|
+++ b/nss_dp_main.c
|
|
|
-@@ -418,7 +418,7 @@ static int nss_dp_open(struct net_device
|
|
|
+@@ -436,7 +436,7 @@ static int nss_dp_open(struct net_device
|
|
|
|
|
|
netif_start_queue(netdev);
|
|
|
|
|
|
@@ -52,7 +52,7 @@ Signed-off-by: Robert Marko <[email protected]>
|
|
|
/* Notify data plane link is up */
|
|
|
if (dp_priv->data_plane_ops->link_state(dp_priv->dpc, 1)) {
|
|
|
netdev_dbg(netdev, "Data plane set link failed\n");
|
|
|
-@@ -615,6 +615,12 @@ static int32_t nss_dp_of_get_pdata(struc
|
|
|
+@@ -633,6 +633,12 @@ static int32_t nss_dp_of_get_pdata(struc
|
|
|
return -EFAULT;
|
|
|
}
|
|
|
|
|
|
@@ -65,7 +65,7 @@ Signed-off-by: Robert Marko <[email protected]>
|
|
|
if (of_property_read_u32(np, "qcom,mactype", &hal_pdata->mactype)) {
|
|
|
pr_err("%s: error reading mactype\n", np->name);
|
|
|
return -EFAULT;
|
|
|
-@@ -635,18 +641,6 @@ static int32_t nss_dp_of_get_pdata(struc
|
|
|
+@@ -653,18 +659,6 @@ static int32_t nss_dp_of_get_pdata(struc
|
|
|
return -EFAULT;
|
|
|
#endif
|
|
|
|
|
|
@@ -84,7 +84,7 @@ Signed-off-by: Robert Marko <[email protected]>
|
|
|
#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 1, 0))
|
|
|
maddr = (uint8_t *)of_get_mac_address(np);
|
|
|
#if (LINUX_VERSION_CODE > KERNEL_VERSION(5, 4, 0))
|
|
|
-@@ -695,56 +689,6 @@ static int32_t nss_dp_of_get_pdata(struc
|
|
|
+@@ -753,56 +747,6 @@ static int32_t nss_dp_of_get_pdata(struc
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
@@ -141,7 +141,7 @@ Signed-off-by: Robert Marko <[email protected]>
|
|
|
#ifdef CONFIG_NET_SWITCHDEV
|
|
|
/*
|
|
|
* nss_dp_is_phy_dev()
|
|
|
-@@ -803,7 +747,6 @@ static int32_t nss_dp_probe(struct platf
|
|
|
+@@ -861,7 +805,6 @@ static int32_t nss_dp_probe(struct platf
|
|
|
struct device_node *np = pdev->dev.of_node;
|
|
|
struct nss_gmac_hal_platform_data gmac_hal_pdata;
|
|
|
int32_t ret = 0;
|
|
|
@@ -149,7 +149,7 @@ Signed-off-by: Robert Marko <[email protected]>
|
|
|
#if defined(NSS_DP_PPE_SUPPORT)
|
|
|
uint32_t vsi_id;
|
|
|
fal_port_t port_id;
|
|
|
-@@ -880,22 +823,14 @@ static int32_t nss_dp_probe(struct platf
|
|
|
+@@ -940,22 +883,15 @@ static int32_t nss_dp_probe(struct platf
|
|
|
|
|
|
dp_priv->drv_flags |= NSS_DP_PRIV_FLAG(INIT_DONE);
|
|
|
|
|
|
@@ -161,20 +161,22 @@ Signed-off-by: Robert Marko <[email protected]>
|
|
|
- }
|
|
|
- snprintf(phy_id, MII_BUS_ID_SIZE + 3, PHY_ID_FMT,
|
|
|
- dp_priv->miibus->id, dp_priv->phy_mdio_addr);
|
|
|
--
|
|
|
+ if (dp_priv->phy_node) {
|
|
|
- SET_NETDEV_DEV(netdev, &pdev->dev);
|
|
|
|
|
|
- dp_priv->phydev = phy_connect(netdev, phy_id,
|
|
|
- &nss_dp_adjust_link,
|
|
|
- dp_priv->phy_mii_type);
|
|
|
- if (IS_ERR(dp_priv->phydev)) {
|
|
|
- netdev_dbg(netdev, "failed to connect to phy device\n");
|
|
|
+- goto phy_setup_fail;
|
|
|
+- }
|
|
|
+ dp_priv->phydev = of_phy_connect(netdev, dp_priv->phy_node,
|
|
|
-+ &nss_dp_adjust_link, 0,
|
|
|
-+ dp_priv->phy_mii_type);
|
|
|
++ &nss_dp_adjust_link, 0,
|
|
|
++ dp_priv->phy_mii_type);
|
|
|
+ if (!(dp_priv->phydev)) {
|
|
|
+ netdev_err(netdev, "failed to connect to phy device\n");
|
|
|
- goto phy_setup_fail;
|
|
|
- }
|
|
|
++ goto phy_setup_fail;
|
|
|
++ }
|
|
|
}
|
|
|
+
|
|
|
+ #if defined(NSS_DP_PPE_SUPPORT)
|