From: Bruce Allan Date: Fri, 25 Feb 2011 06:36:25 +0000 (+0000) Subject: e1000e: extend timeout for ethtool link test diagnostic X-Git-Tag: v2.6.39-rc1~468^2~94 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5661aeb08edcef6799861f92817f593c1fd7b272;p=platform%2Fupstream%2Fkernel-adaptation-pc.git 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 Tested-by: Jeff Pieper Signed-off-by: Jeff Kirsher --- diff --git a/drivers/net/e1000e/ethtool.c b/drivers/net/e1000e/ethtool.c index d4e51aa..8e276dc 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) } else { hw->mac.ops.check_for_link(hw); 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) & - E1000_STATUS_LU)) + if (!(er32(STATUS) & E1000_STATUS_LU)) *data = 1; } return *data;