e1000: allow ethtool to see link status when down
authorKok, Auke <auke-jan.h.kok@intel.com>
Fri, 16 Feb 2007 22:39:30 +0000 (14:39 -0800)
committerJeff Garzik <jeff@garzik.org>
Sat, 17 Feb 2007 20:37:14 +0000 (15:37 -0500)
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>
drivers/net/e1000/e1000_ethtool.c

index 44ebc72962dc47d6e434f8153b21f4932985cac1..6777887295f538822d006aa582986cac6eeb94a7 100644 (file)
@@ -166,7 +166,7 @@ e1000_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)
                        ecmd->transceiver = XCVR_EXTERNAL;
        }
 
-       if (netif_carrier_ok(adapter->netdev)) {
+       if (E1000_READ_REG(&adapter->hw, STATUS) & E1000_STATUS_LU) {
 
                e1000_get_speed_and_duplex(hw, &adapter->link_speed,
                                                   &adapter->link_duplex);