Commit 97ae7a65 authored by Ganesh Venkatesan's avatar Ganesh Venkatesan Committed by Jeff Garzik

[PATCH] e100 - restore speed/duplex/autoneg settings after

the completion of the diagnostic tests
parent f9c235e6
...@@ -1961,18 +1961,27 @@ static int e100_diag_test_count(struct net_device *netdev) ...@@ -1961,18 +1961,27 @@ static int e100_diag_test_count(struct net_device *netdev)
static void e100_diag_test(struct net_device *netdev, static void e100_diag_test(struct net_device *netdev,
struct ethtool_test *test, u64 *data) struct ethtool_test *test, u64 *data)
{ {
struct ethtool_cmd cmd;
struct nic *nic = netdev_priv(netdev); struct nic *nic = netdev_priv(netdev);
int i; int i, err;
memset(data, 0, E100_TEST_LEN * sizeof(u64)); memset(data, 0, E100_TEST_LEN * sizeof(u64));
data[0] = !mii_link_ok(&nic->mii); data[0] = !mii_link_ok(&nic->mii);
data[1] = e100_eeprom_load(nic); data[1] = e100_eeprom_load(nic);
if(test->flags & ETH_TEST_FL_OFFLINE) { if(test->flags & ETH_TEST_FL_OFFLINE) {
/* save speed, duplex & autoneg settings */
err = mii_ethtool_gset(&nic->mii, &cmd);
if(netif_running(netdev)) if(netif_running(netdev))
e100_down(nic); e100_down(nic);
data[2] = e100_self_test(nic); data[2] = e100_self_test(nic);
data[3] = e100_loopback_test(nic, lb_mac); data[3] = e100_loopback_test(nic, lb_mac);
data[4] = e100_loopback_test(nic, lb_phy); data[4] = e100_loopback_test(nic, lb_phy);
/* restore speed, duplex & autoneg settings */
err = mii_ethtool_sset(&nic->mii, &cmd);
if(netif_running(netdev)) if(netif_running(netdev))
e100_up(nic); e100_up(nic);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment