aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/i40e/i40e_common.c
diff options
context:
space:
mode:
authorKevin Scott <kevin.c.scott@intel.com>2016-02-17 16:12:13 -0800
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2016-02-18 23:39:53 -0800
commit4d7cec078de864b7ba5459aa688278c4e6f3ad42 (patch)
tree83c5e4dcc0e5a97c7e03ba58c0bb478bcdab2b0e /drivers/net/ethernet/intel/i40e/i40e_common.c
parenti40e: Fix led blink capability for 10GBaseT PHY (diff)
downloadlinux-dev-4d7cec078de864b7ba5459aa688278c4e6f3ad42.tar.xz
linux-dev-4d7cec078de864b7ba5459aa688278c4e6f3ad42.zip
i40e: Increase timeout when checking GLGEN_RSTAT_DEVSTATE bit
When linking with particular PHY types (ex: copper PHY), the amount of time it takes for the GLGEN_RSTAT_DEVSTATE to be set increases greatly, which can lead to a timeout and failure to load the driver. Change-ID: If02be0dfcd7c57fdde2d5c81cd63651260cd2029 Signed-off-by: Kevin Scott <kevin.c.scott@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to '')
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_common.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_common.c b/drivers/net/ethernet/intel/i40e/i40e_common.c
index d41719331976..3a57e59c2a1a 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_common.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_common.c
@@ -1239,7 +1239,13 @@ i40e_status i40e_pf_reset(struct i40e_hw *hw)
grst_del = (rd32(hw, I40E_GLGEN_RSTCTL) &
I40E_GLGEN_RSTCTL_GRSTDEL_MASK) >>
I40E_GLGEN_RSTCTL_GRSTDEL_SHIFT;
- for (cnt = 0; cnt < grst_del + 10; cnt++) {
+
+ /* It can take upto 15 secs for GRST steady state.
+ * Bump it to 16 secs max to be safe.
+ */
+ grst_del = grst_del * 20;
+
+ for (cnt = 0; cnt < grst_del; cnt++) {
reg = rd32(hw, I40E_GLGEN_RSTAT);
if (!(reg & I40E_GLGEN_RSTAT_DEVSTATE_MASK))
break;