diff options
author | Matt Carlson <mcarlson@broadcom.com> | 2012-02-22 16:35:18 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-02-23 10:57:17 +0400 |
commit | 34655ad63893d3dd64f3fbaaaa0791550e554fa9 (patch) | |
tree | 15e0fab7a17f7fecb372224792dff46ba76e3c30 /drivers/net/ethernet/broadcom/tg3.h | |
parent | 9f6f9af7694ede6314bed281eec74d588ba9474f (diff) | |
download | linux-34655ad63893d3dd64f3fbaaaa0791550e554fa9.tar.xz |
tg3: Fix link check in tg3_adjust_link
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: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/tg3.h')
-rw-r--r-- | drivers/net/ethernet/broadcom/tg3.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/tg3.h b/drivers/net/ethernet/broadcom/tg3.h index 22cbe74b3d11..66bcfca55261 100644 --- a/drivers/net/ethernet/broadcom/tg3.h +++ b/drivers/net/ethernet/broadcom/tg3.h @@ -3064,6 +3064,7 @@ struct tg3 { struct mii_bus *mdio_bus; int mdio_irq[PHY_MAX_ADDR]; + int old_link; u8 phy_addr; |