[Feature][ZXW-52][ETH]jy3103 PHY Support ping external network

Only Configure:No,
Affected branch:master,
Affected module:ETH,
Is it affected on both ZXIC and MTK:only ZXIC,
Self-test:Yes,
Doc Update:Yes.

Change-Id: I9b49881778ce49a5d35a8a4c7119a31d97d9cfc0
diff --git a/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/drivers/net/phy/jlsemi/jl3xxx.c b/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/drivers/net/phy/jlsemi/jl3xxx.c
index 52e15a1..7f9c48c 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/drivers/net/phy/jlsemi/jl3xxx.c
+++ b/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/drivers/net/phy/jlsemi/jl3xxx.c
@@ -286,10 +286,10 @@
 
 	if ((i % 5 == 0) && debug_on) {
         printk("[%s] link:%d\n", __func__, phydev->link);
-		mdiobus_write(phydev->mdio.bus, 7, 0x0d, 0x3);
-	    mdiobus_write(phydev->mdio.bus, 7, 0x0e, 0x8000);
-	    mdiobus_write(phydev->mdio.bus, 7, 0x0d, 0x4000 | 0x3);	    
-		printk("[%s] rmii config:0x%x\n", __func__, mdiobus_read(phydev->mdio.bus, 7, 0x0e));
+		mdiobus_write(phydev->mdio.bus, phydev->mdio.addr, 0x0d, 0x3);
+	    mdiobus_write(phydev->mdio.bus, phydev->mdio.addr, 0x0e, 0x8000);
+	    mdiobus_write(phydev->mdio.bus, phydev->mdio.addr, 0x0d, 0x4000 | 0x3);
+		printk("[%s] cy rmii config:0x%x\n", __func__, mdiobus_read(phydev->mdio.bus, phydev->mdio.addr, 0x0e));
 		
     }
 	i++;
@@ -300,17 +300,17 @@
 static int jl3_config_init(struct phy_device *phydev)
 {
 	DBG("%s(), an:= %d, if:= %d\n", __func__, phydev->autoneg, phydev->interface);
-	printk("[%s] addr:%d\n", __func__, phydev->mdio.addr);
+	printk("[%s] cy-addr:%d\n", __func__, phydev->mdio.addr);
 //	jl3113_config_init(phydev, ROLE, SPEED_1000);
-	mdiobus_write(phydev->mdio.bus, 7, 0x0d, 0x3);
-	mdiobus_write(phydev->mdio.bus, 7, 0x0e, 0x8000);
-	mdiobus_write(phydev->mdio.bus, 7, 0x0d, 0x4000 | 0x3);
-	mdiobus_write(phydev->mdio.bus, 7, 0x0e, 0x46);
+	mdiobus_write(phydev->mdio.bus, phydev->mdio.addr, 0x0d, 0x3);
+	mdiobus_write(phydev->mdio.bus, phydev->mdio.addr, 0x0e, 0x8000);
+	mdiobus_write(phydev->mdio.bus, phydev->mdio.addr, 0x0d, 0x4000 | 0x3);
+	mdiobus_write(phydev->mdio.bus, phydev->mdio.addr, 0x0e, 0x46);
 
-	mdiobus_write(phydev->mdio.bus, 7, 0x0d, 0x1);
-	mdiobus_write(phydev->mdio.bus, 7, 0x0e, 0x0000);
-	mdiobus_write(phydev->mdio.bus, 7, 0x0d, 0x4000 | 0x1);
-	mdiobus_write(phydev->mdio.bus, 7, 0x0e, 0xA000);
+	mdiobus_write(phydev->mdio.bus, phydev->mdio.addr, 0x0d, 0x1);
+	mdiobus_write(phydev->mdio.bus, phydev->mdio.addr, 0x0e, 0x0000);
+	mdiobus_write(phydev->mdio.bus, phydev->mdio.addr, 0x0d, 0x4000 | 0x1);
+	mdiobus_write(phydev->mdio.bus, phydev->mdio.addr, 0x0e, 0xA000);
 
 	return 0;
 }
@@ -325,6 +325,7 @@
 	if(phydev->mdio.bus == NULL)
 		return 0;
 
+
 	org_phy_status = jlphy_port_state;
 	islink = rd(phydev, 0x1, 0x1);
 	islink = (islink&0x4)?1:0;
@@ -334,12 +335,8 @@
 	if(islink == 1)
 		new_phy_status = 1;
 
-	if((org_phy_status == 0)&&(new_phy_status == 1)) {
-	    wt(phydev, 0x3, 0x8000, 0x46);
-        wt(phydev, 0x1, 0x0000, 0xA000);
-        gmac_event_notify(GMAC_ETH_PHY_PLUGIN, NULL);
-    }
-
+	if((org_phy_status == 0)&&(new_phy_status == 1))
+		gmac_event_notify(GMAC_ETH_PHY_PLUGIN, NULL);
 
 	if((org_phy_status == 1)&&(new_phy_status == 0))
 		gmac_event_notify(GMAC_ETH_PHY_PLUGOUT, NULL);