--- zzzz-none-000/linux-4.4.60/drivers/net/phy/phy_device.c 2017-04-08 07:53:53.000000000 +0000 +++ scorpion-7490-727/linux-4.4.60/drivers/net/phy/phy_device.c 2021-02-04 17:41:59.000000000 +0000 @@ -734,6 +734,9 @@ struct mii_bus *bus; int i; + if (phydev->drv && phydev->drv->detach) + phydev->drv->detach(phydev); + phydev->attached_dev->phydev = NULL; phydev->attached_dev = NULL; phy_suspend(phydev); @@ -995,6 +998,9 @@ { int status; + if (phydev->drv->update_link) + return phydev->drv->update_link(phydev); + /* Do a fake read */ status = phy_read(phydev, MII_BMSR); if (status < 0) @@ -1207,7 +1213,7 @@ return 0; } -static int gen10g_soft_reset(struct phy_device *phydev) +static int no_soft_reset(struct phy_device *phydev) { /* Do nothing for now */ return 0; @@ -1442,7 +1448,7 @@ .phy_id = 0xffffffff, .phy_id_mask = 0xffffffff, .name = "Generic PHY", - .soft_reset = genphy_soft_reset, + .soft_reset = no_soft_reset, .config_init = genphy_config_init, .features = PHY_GBIT_FEATURES | SUPPORTED_MII | SUPPORTED_AUI | SUPPORTED_FIBRE | @@ -1457,7 +1463,7 @@ .phy_id = 0xffffffff, .phy_id_mask = 0xffffffff, .name = "Generic 10G PHY", - .soft_reset = gen10g_soft_reset, + .soft_reset = no_soft_reset, .config_init = gen10g_config_init, .features = 0, .config_aneg = gen10g_config_aneg,