diff options
author | Jesse Brandeburg <jesse.brandeburg@intel.com> | 2006-08-16 16:31:33 -0400 |
---|---|---|
committer | Auke Kok <juke-jan.h.kok@intel.com> | 2006-08-16 16:31:33 -0400 |
commit | d658266ed6144f9dbc785c7d5bb6e8e5e2e7f3cf (patch) | |
tree | 1b61f68c5339e7591bebafc87de807c144b9fa0b | |
parent | 673a052fde79ab5e9dce569b0336358812ddba2d (diff) |
e1000: Explicitly power up the PHY during loopback testing.
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
-rw-r--r-- | drivers/net/e1000/e1000_ethtool.c | 7 | ||||
-rw-r--r-- | drivers/net/e1000/e1000_main.c | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c index 88a82ba88f57..8edbc6b0b9c7 100644 --- a/drivers/net/e1000/e1000_ethtool.c +++ b/drivers/net/e1000/e1000_ethtool.c | |||
@@ -1590,6 +1590,8 @@ e1000_diag_test_count(struct net_device *netdev) | |||
1590 | return E1000_TEST_LEN; | 1590 | return E1000_TEST_LEN; |
1591 | } | 1591 | } |
1592 | 1592 | ||
1593 | extern void e1000_power_up_phy(struct e1000_adapter *); | ||
1594 | |||
1593 | static void | 1595 | static void |
1594 | e1000_diag_test(struct net_device *netdev, | 1596 | e1000_diag_test(struct net_device *netdev, |
1595 | struct ethtool_test *eth_test, uint64_t *data) | 1597 | struct ethtool_test *eth_test, uint64_t *data) |
@@ -1606,6 +1608,8 @@ e1000_diag_test(struct net_device *netdev, | |||
1606 | uint8_t forced_speed_duplex = adapter->hw.forced_speed_duplex; | 1608 | uint8_t forced_speed_duplex = adapter->hw.forced_speed_duplex; |
1607 | uint8_t autoneg = adapter->hw.autoneg; | 1609 | uint8_t autoneg = adapter->hw.autoneg; |
1608 | 1610 | ||
1611 | DPRINTK(HW, INFO, "offline testing starting\n"); | ||
1612 | |||
1609 | /* Link test performed before hardware reset so autoneg doesn't | 1613 | /* Link test performed before hardware reset so autoneg doesn't |
1610 | * interfere with test result */ | 1614 | * interfere with test result */ |
1611 | if (e1000_link_test(adapter, &data[4])) | 1615 | if (e1000_link_test(adapter, &data[4])) |
@@ -1629,6 +1633,8 @@ e1000_diag_test(struct net_device *netdev, | |||
1629 | eth_test->flags |= ETH_TEST_FL_FAILED; | 1633 | eth_test->flags |= ETH_TEST_FL_FAILED; |
1630 | 1634 | ||
1631 | e1000_reset(adapter); | 1635 | e1000_reset(adapter); |
1636 | /* make sure the phy is powered up */ | ||
1637 | e1000_power_up_phy(adapter); | ||
1632 | if (e1000_loopback_test(adapter, &data[3])) | 1638 | if (e1000_loopback_test(adapter, &data[3])) |
1633 | eth_test->flags |= ETH_TEST_FL_FAILED; | 1639 | eth_test->flags |= ETH_TEST_FL_FAILED; |
1634 | 1640 | ||
@@ -1642,6 +1648,7 @@ e1000_diag_test(struct net_device *netdev, | |||
1642 | if (if_running) | 1648 | if (if_running) |
1643 | dev_open(netdev); | 1649 | dev_open(netdev); |
1644 | } else { | 1650 | } else { |
1651 | DPRINTK(HW, INFO, "online testing starting\n"); | ||
1645 | /* Online tests */ | 1652 | /* Online tests */ |
1646 | if (e1000_link_test(adapter, &data[4])) | 1653 | if (e1000_link_test(adapter, &data[4])) |
1647 | eth_test->flags |= ETH_TEST_FL_FAILED; | 1654 | eth_test->flags |= ETH_TEST_FL_FAILED; |
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index bd7770f6b2a1..b2caaa2117f2 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c | |||
@@ -484,7 +484,7 @@ e1000_up(struct e1000_adapter *adapter) | |||
484 | * | 484 | * |
485 | **/ | 485 | **/ |
486 | 486 | ||
487 | static void e1000_power_up_phy(struct e1000_adapter *adapter) | 487 | void e1000_power_up_phy(struct e1000_adapter *adapter) |
488 | { | 488 | { |
489 | uint16_t mii_reg = 0; | 489 | uint16_t mii_reg = 0; |
490 | 490 | ||