Commit 5661aeb0 authored by Bruce Allan's avatar Bruce Allan Committed by Jeff Kirsher

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: default avatarBruce Allan <bruce.w.allan@intel.com>
Tested-by: default avatarJeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent d8d5f8ae
...@@ -1666,10 +1666,13 @@ static int e1000_link_test(struct e1000_adapter *adapter, u64 *data) ...@@ -1666,10 +1666,13 @@ static int e1000_link_test(struct e1000_adapter *adapter, u64 *data)
} else { } else {
hw->mac.ops.check_for_link(hw); hw->mac.ops.check_for_link(hw);
if (hw->mac.autoneg) if (hw->mac.autoneg)
msleep(4000); /*
* On some Phy/switch combinations, link establishment
* can take a few seconds more than expected.
*/
msleep(5000);
if (!(er32(STATUS) & if (!(er32(STATUS) & E1000_STATUS_LU))
E1000_STATUS_LU))
*data = 1; *data = 1;
} }
return *data; return *data;
......
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