mirror of
				https://github.com/Telecominfraproject/wlan-ap.git
				synced 2025-10-31 02:17:58 +00:00 
			
		
		
		
	ipq53xx: fix ethernet link issues
Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
		| @@ -1214,5 +1214,6 @@ CONFIG_HWMON=y | ||||
| # CONFIG_BOOTCONFIG_PARTITION is not set | ||||
| CONFIG_ARM_PMU=y | ||||
| # CONFIG_SECCRYPT is not set | ||||
| CONFIG_REALTEK_PHY=y | ||||
| CONFIG_RTK_MSSDK_PHY=y | ||||
| # CONFIG_NF_CONNTRACK_CHAIN_EVENTS is not set | ||||
|   | ||||
| @@ -42,12 +42,10 @@ | ||||
|  | ||||
| 			phy0: ethernet-phy@0 { | ||||
| 				reg = <8>; | ||||
| 				compatible ="ethernet-phy-ieee802.3-c45"; | ||||
| 			//	fixup; | ||||
| 			}; | ||||
|  | ||||
| 			phy1: ethernet-phy@1 { | ||||
| 				reg = <12>; | ||||
| 			//	fixup; | ||||
| 			}; | ||||
| 		}; | ||||
|  | ||||
|   | ||||
| @@ -68,7 +68,6 @@ | ||||
| 						port_id = <1>; | ||||
| 						phy_address = <2>; | ||||
| 						mdiobus = <&mdio>; | ||||
| 						ethernet-phy-ieee802.3-c45; | ||||
| 					}; | ||||
| 					port@1 { | ||||
| 						port_id = <2>; | ||||
|   | ||||
| @@ -0,0 +1,35 @@ | ||||
| --- a/nss_dp_main.c | ||||
| +++ b/nss_dp_main.c | ||||
| @@ -295,8 +295,6 @@ static int nss_dp_close(struct net_devic | ||||
|  		return -EAGAIN; | ||||
|  	} | ||||
|   | ||||
| -	if (dp_priv->phydev) | ||||
| -		phy_stop(dp_priv->phydev); | ||||
|  	dp_priv->link_state = __NSS_DP_LINK_DOWN; | ||||
|   | ||||
|  #if defined(NSS_DP_PPE_SUPPORT) | ||||
| @@ -434,7 +432,12 @@ static int nss_dp_open(struct net_device | ||||
|  		netif_carrier_on(netdev); | ||||
|  	} else { | ||||
|  		dp_priv->link_state = __NSS_DP_LINK_DOWN; | ||||
| -		phy_start(dp_priv->phydev); | ||||
| +		if (phy_is_started(dp_priv->phydev)) { | ||||
| +			dp_priv->phydev->state = PHY_UP; | ||||
| +			phy_trigger_machine(dp_priv->phydev); | ||||
| +		} else { | ||||
| +			phy_start(dp_priv->phydev); | ||||
| +		} | ||||
|  		phy_start_aneg(dp_priv->phydev); | ||||
|  	} | ||||
|   | ||||
| @@ -1024,6 +1027,9 @@ static int nss_dp_remove(struct platform | ||||
|  		dp_ops = dp_priv->data_plane_ops; | ||||
|  		hal_ops = dp_priv->gmac_hal_ops; | ||||
|   | ||||
| +		if (phy_is_started(dp_priv->phydev)) | ||||
| +			phy_stop(dp_priv->phydev); | ||||
| + | ||||
|  		if (dp_priv->phydev) | ||||
|  			phy_disconnect(dp_priv->phydev); | ||||
|   | ||||
| @@ -1,12 +0,0 @@ | ||||
| --- | ||||
| profile: cig_wf189 | ||||
| target: ipq53xx | ||||
| subtarget: generic | ||||
| description: Build image for the CIG WF189 | ||||
| image: bin/targets/ipq53xx/generic/openwrt-ipq53xx-cig_wf189-squashfs-sysupgrade.tar | ||||
| feeds: | ||||
|   - name: qca | ||||
|     path: ../../feeds/qca | ||||
| packages: | ||||
|   - ipq53xx | ||||
|   - ftm | ||||
| @@ -5,12 +5,10 @@ subtarget: generic | ||||
| description: Build image for the CIG WF189 | ||||
| image: bin/targets/ipq53xx/generic/openwrt-ipq53xx-cig_wf189-squashfs-sysupgrade.tar | ||||
| feeds: | ||||
|   - name: ipq95xx | ||||
|     path: ../../feeds/ipq95xx | ||||
|   - name: qca | ||||
|     path: ../../feeds/qca | ||||
| include: | ||||
|   - ucentral-ap | ||||
| packages: | ||||
|   - ipq53xx | ||||
|   - ftm | ||||
| include: | ||||
|   - ucentral-ap | ||||
| diffconfig: | | ||||
|   CONFIG_KERNEL_IPQ_MEM_PROFILE=0 | ||||
|   | ||||
| @@ -1,14 +0,0 @@ | ||||
| --- | ||||
| profile: edgecore_eap105 | ||||
| target: ipq53xx | ||||
| subtarget: generic | ||||
| description: Build image for the edgecore eap105 | ||||
| image: bin/targets/ipq53xx/generic/openwrt-ipq53xx-edgecore_eap105-squashfs-sysupgrade.tar | ||||
| feeds: | ||||
|   - name: qca | ||||
|     path: ../../feeds/qca | ||||
| include: | ||||
|   - ucentral-ap | ||||
| packages: | ||||
|   - ipq53xx | ||||
|   - qca-ssdk-shell | ||||
| @@ -5,12 +5,10 @@ subtarget: generic | ||||
| description: Build image for the edgecore eap105 | ||||
| image: bin/targets/ipq53xx/generic/openwrt-ipq53xx-edgecore_eap105-squashfs-sysupgrade.tar | ||||
| feeds: | ||||
|   - name: ipq95xx | ||||
|     path: ../../feeds/ipq95xx | ||||
|   - name: qca | ||||
|     path: ../../feeds/qca | ||||
| include: | ||||
|   - ucentral-ap | ||||
| packages: | ||||
|   - ipq53xx | ||||
|   - qca-ssdk-shell | ||||
| include: | ||||
|   - ucentral-ap | ||||
| diffconfig: | | ||||
|   CONFIG_KERNEL_IPQ_MEM_PROFILE=0 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 John Crispin
					John Crispin