diff options
author | Alexander Duyck <alexander.h.duyck@intel.com> | 2009-03-31 16:38:56 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-04-02 03:59:08 -0400 |
commit | cdfa9f6444ced9425e8e4fe4c2975a620e664b77 (patch) | |
tree | c2eae2326a4bbfd11056d9e91de84c0f2b488011 /drivers/net | |
parent | a6a605691f666482a261d69da7e0cef7048a434b (diff) |
igb: cleanup igb loopback path
The code path for setting up phy loopback testing was out of date and was
setting bits it didn't need to. This change cleans up the code path and
removes some code that has no effect on teh driver.
Signed-off-by: Alexander Duyck <alexander.h.duyck@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')
-rw-r--r-- | drivers/net/igb/igb_ethtool.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/net/igb/igb_ethtool.c b/drivers/net/igb/igb_ethtool.c index fb09c8ad9f0d..27eae49e79c2 100644 --- a/drivers/net/igb/igb_ethtool.c +++ b/drivers/net/igb/igb_ethtool.c | |||
@@ -1419,7 +1419,6 @@ static int igb_integrated_phy_loopback(struct igb_adapter *adapter) | |||
1419 | { | 1419 | { |
1420 | struct e1000_hw *hw = &adapter->hw; | 1420 | struct e1000_hw *hw = &adapter->hw; |
1421 | u32 ctrl_reg = 0; | 1421 | u32 ctrl_reg = 0; |
1422 | u32 stat_reg = 0; | ||
1423 | 1422 | ||
1424 | hw->mac.autoneg = false; | 1423 | hw->mac.autoneg = false; |
1425 | 1424 | ||
@@ -1443,18 +1442,11 @@ static int igb_integrated_phy_loopback(struct igb_adapter *adapter) | |||
1443 | ctrl_reg |= (E1000_CTRL_FRCSPD | /* Set the Force Speed Bit */ | 1442 | ctrl_reg |= (E1000_CTRL_FRCSPD | /* Set the Force Speed Bit */ |
1444 | E1000_CTRL_FRCDPX | /* Set the Force Duplex Bit */ | 1443 | E1000_CTRL_FRCDPX | /* Set the Force Duplex Bit */ |
1445 | E1000_CTRL_SPD_1000 |/* Force Speed to 1000 */ | 1444 | E1000_CTRL_SPD_1000 |/* Force Speed to 1000 */ |
1446 | E1000_CTRL_FD); /* Force Duplex to FULL */ | 1445 | E1000_CTRL_FD | /* Force Duplex to FULL */ |
1446 | E1000_CTRL_SLU); /* Set link up enable bit */ | ||
1447 | 1447 | ||
1448 | if (hw->phy.media_type == e1000_media_type_copper && | 1448 | if (hw->phy.type == e1000_phy_m88) |
1449 | hw->phy.type == e1000_phy_m88) | ||
1450 | ctrl_reg |= E1000_CTRL_ILOS; /* Invert Loss of Signal */ | 1449 | ctrl_reg |= E1000_CTRL_ILOS; /* Invert Loss of Signal */ |
1451 | else { | ||
1452 | /* Set the ILOS bit on the fiber Nic if half duplex link is | ||
1453 | * detected. */ | ||
1454 | stat_reg = rd32(E1000_STATUS); | ||
1455 | if ((stat_reg & E1000_STATUS_FD) == 0) | ||
1456 | ctrl_reg |= (E1000_CTRL_ILOS | E1000_CTRL_SLU); | ||
1457 | } | ||
1458 | 1450 | ||
1459 | wr32(E1000_CTRL, ctrl_reg); | 1451 | wr32(E1000_CTRL, ctrl_reg); |
1460 | 1452 | ||