i40e: Increase the amount of time we wait for reset to be done
authorPaul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Wed, 26 Aug 2015 19:14:07 +0000 (15:14 -0400)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 7 Oct 2015 20:10:10 +0000 (13:10 -0700)
In some rare cases the reset can take longer to complete so increase the
amount of time we wait.

Change-ID: Ib5628ec54b526a811ee33d1214fe763226406671
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_common.c

index 6833717..1e81f4e 100644 (file)
@@ -1256,7 +1256,7 @@ 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 + 2; cnt++) {
+       for (cnt = 0; cnt < grst_del + 10; cnt++) {
                reg = rd32(hw, I40E_GLGEN_RSTAT);
                if (!(reg & I40E_GLGEN_RSTAT_DEVSTATE_MASK))
                        break;