• Heiner Kallweit's avatar
    net: phy: improve genphy_soft_reset · 8c90b795
    Heiner Kallweit authored
    PHY's behave differently when being reset. Some reset registers to
    defaults, some don't. Some trigger an autoneg restart, some don't.
    
    So let's also set the autoneg restart bit when resetting. Then PHY
    behavior should be more consistent. Clearing BMCR_ISOLATE serves the
    same purpose and is borrowed from genphy_restart_aneg.
    
    BMCR holds the speed / duplex settings in fixed mode. Therefore
    we may have an issue if a soft reset resets BMCR to its default.
    So better call genphy_setup_forced() afterwards in fixed mode.
    We've seen no related complaint in the last >10 yrs, so let's
    treat it as an improvement.
    Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    8c90b795
phy_device.c 61.7 KB