• Matt Carlson's avatar
    tg3: Fix link check in tg3_adjust_link · 34655ad6
    Matt Carlson authored
    The tg3 driver tried to detect link changes by comparing the tg3 local
    active_speed member with SPEED_UNKNOWN (or formerly SPEED_INVALID).
    This check is not correct, since phylib will never set its speed member
    to either of these two values.  The code only appeared to work because
    tg3 initializes active_speed to SPEED_INVALID during tg3_init_one.  This
    patch introduces a new "old_link" tg3 member and then compares the
    phy_device's link member against it to detect link state changes.
    Signed-off-by: default avatarMatt Carlson <mcarlson@broadcom.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    34655ad6
tg3.h 117 KB