diff options
author | Bruce Allan <bruce.w.allan@intel.com> | 2008-11-22 01:01:35 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-22 01:01:35 (GMT) |
commit | a20e4cf9e6a37e40532593e00df153d01e317baf (patch) | |
tree | 265746fe24aaa86df847c812e708c337ce06fa00 /drivers/net/e1000e/ethtool.c | |
parent | 8452759060ad46fc071a7d5bbf1647df5ea2ceab (diff) | |
download | linux-a20e4cf9e6a37e40532593e00df153d01e317baf.tar.xz |
e1000e: fix incorrect link status when switch module pulled
On 82571 with SerDes, the true link state is not always correct when read
from the STATUS register; use existing e1000_has_link() function instead.
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/e1000e/ethtool.c')
-rw-r--r-- | drivers/net/e1000e/ethtool.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/net/e1000e/ethtool.c b/drivers/net/e1000e/ethtool.c index 840e8c4..34f1f63 100644 --- a/drivers/net/e1000e/ethtool.c +++ b/drivers/net/e1000e/ethtool.c @@ -173,11 +173,8 @@ static int e1000_get_settings(struct net_device *netdev, static u32 e1000_get_link(struct net_device *netdev) { struct e1000_adapter *adapter = netdev_priv(netdev); - struct e1000_hw *hw = &adapter->hw; - u32 status; - - status = er32(STATUS); - return (status & E1000_STATUS_LU) ? 1 : 0; + + return e1000_has_link(adapter); } static int e1000_set_spd_dplx(struct e1000_adapter *adapter, u16 spddplx) |