aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKok, Auke <auke-jan.h.kok@intel.com>2007-02-16 17:39:30 -0500
committerJeff Garzik <jeff@garzik.org>2007-02-17 15:37:14 -0500
commitca6efb7d6c9336acda2e7b76a39b59bbfe77ec13 (patch)
tree4cf6274ccd88b79a4294216b0b5bfef01e50ff78
parent1d33e9c606bcf3d00bf67477e34253e861bb71c3 (diff)
e1000: allow ethtool to see link status when down
By reading the MAC status register we can detect whether the MAC has seen the PHY see link. This allows us to show the link properties before the device is up in ethtool. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
-rw-r--r--drivers/net/e1000/e1000_ethtool.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c
index 44ebc72962dc..6777887295f5 100644
--- a/drivers/net/e1000/e1000_ethtool.c
+++ b/drivers/net/e1000/e1000_ethtool.c
@@ -166,7 +166,7 @@ e1000_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)
166 ecmd->transceiver = XCVR_EXTERNAL; 166 ecmd->transceiver = XCVR_EXTERNAL;
167 } 167 }
168 168
169 if (netif_carrier_ok(adapter->netdev)) { 169 if (E1000_READ_REG(&adapter->hw, STATUS) & E1000_STATUS_LU) {
170 170
171 e1000_get_speed_and_duplex(hw, &adapter->link_speed, 171 e1000_get_speed_and_duplex(hw, &adapter->link_speed,
172 &adapter->link_duplex); 172 &adapter->link_duplex);