Skip to content
  • Trent Piepho's avatar
    phylib: Fix auto-negotiation restart avoidance · de339c2a
    Trent Piepho authored
    A previous patch, 51e2a384
    
    , made
    genphy_config_aneg() not restart aneg by calling genphy_restart_aneg() if
    the advertisement hadn't changed.
    
    But, genphy_restart_aneg() doesn't just restart aneg, it may also *enable*
    aneg or un-isolate the PHY from the MII (those functions are controlled by
    the same register).  The code to avoid calling genphy_restart_aneg() didn't
    consider this.
    
    So, modify genphy_config_aneg() to also check if the PHY needs to have aneg
    enabled or be un-isolated before deciding not to restart aneg.
    
    This caused a problem with certain Davicom PHYs, as that driver isolates
    the PHY (why?) before calling genphy_config_aneg() and expects the PHY to
    be un-isolated by that function.
    
    Signed-off-by: default avatarTrent Piepho <tpiepho@freescale.com>
    Reported-by: default avatarScott Wood <scottwood@freescale.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    de339c2a