diff options
author | Bruce Allan <bruce.w.allan@intel.com> | 2011-02-25 01:36:25 -0500 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2011-03-11 05:03:35 -0500 |
commit | 5661aeb08edcef6799861f92817f593c1fd7b272 (patch) | |
tree | 1cbf6d455075e98a03fdadf059c696693bcd2cb6 /drivers/net/e1000e/ethtool.c | |
parent | d8d5f8aebb857f979fbe9099c9acc2ed486706be (diff) |
e1000e: extend timeout for ethtool link test diagnostic
With some PHYs supported by this driver, link establishment can take a
little longer when connected to certain switches. Extend the timeout to
reduce the number of false diagnostic failures, and cleanup a code style
issue in the same function.
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/e1000e/ethtool.c')
-rw-r--r-- | drivers/net/e1000e/ethtool.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/e1000e/ethtool.c b/drivers/net/e1000e/ethtool.c index d4e51aa231b9..8e276dc4b848 100644 --- a/drivers/net/e1000e/ethtool.c +++ b/drivers/net/e1000e/ethtool.c | |||
@@ -1666,10 +1666,13 @@ static int e1000_link_test(struct e1000_adapter *adapter, u64 *data) | |||
1666 | } else { | 1666 | } else { |
1667 | hw->mac.ops.check_for_link(hw); | 1667 | hw->mac.ops.check_for_link(hw); |
1668 | if (hw->mac.autoneg) | 1668 | if (hw->mac.autoneg) |
1669 | msleep(4000); | 1669 | /* |
1670 | * On some Phy/switch combinations, link establishment | ||
1671 | * can take a few seconds more than expected. | ||
1672 | */ | ||
1673 | msleep(5000); | ||
1670 | 1674 | ||
1671 | if (!(er32(STATUS) & | 1675 | if (!(er32(STATUS) & E1000_STATUS_LU)) |
1672 | E1000_STATUS_LU)) | ||
1673 | *data = 1; | 1676 | *data = 1; |
1674 | } | 1677 | } |
1675 | return *data; | 1678 | return *data; |