• Vitalii Demianets's avatar
    macb: Keep driver's speed/duplex in sync with actual NCFGR · 26cdfb49
    Vitalii Demianets authored
    When underlying phy driver restores its state very fast after being brought
    down and up so that macb driver function macb_handle_link_change() was never
    called with link state "down", driver's internal representation of phy speed
    and duplex (bp->speed and bp->duplex) didn't change. So, macb driver sees no
    reason to perform actual write to the NCFGR register, although the speed and
    duplex settings in that register were reset when interface was brought down
    and up. In that case actual phy speed and duplex differ from NCFGR settings.
    The patch fixes that by keeping internal driver representation of speed and
    duplex in sync with actual content of NCFGR.
    Signed-off-by: default avatarVitalii Demianets <vitas@nppfactor.kiev.ua>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    26cdfb49
macb.c 41.1 KB