/* genphy_restart_aneg - Enable and Restart Autonegotiation @phydev: target phy_device struct  */
int genphy_restart_aneg(struct phy_device *phydev)
/* genphy_restart_aneg - Enable and Restart Autonegotiation @phydev: target phy_device struct  */
int genphy_restart_aneg(struct phy_device *phydev)
{
    int ctl;
    ctl = phy_read(phydev, MDIO_DEVAD_NONE, MII_BMCR);
    if (ctl < 0)
        return ctl;
    ctl |= (BMCR_ANENABLE | BMCR_ANRESTART);
    ctl &= ~(BMCR_ISOLATE);
    ctl = phy_write(phydev, MDIO_DEVAD_NONE, MII_BMCR, ctl);
    return ctl;
}