From: Helin Zhang Date: Tue, 8 Mar 2016 08:14:28 +0000 (+0800) Subject: i40e/base: fix driver load failure X-Git-Tag: spdx-start~7368 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=8a8807369ffafef90c410279b4b2645d2d7a7483;p=dpdk.git i40e/base: fix driver load failure Fix the driver load failure with linking with some PHY types, as the amount of time it takes for the GLGEN_RSTAT_DEVSTATE to be set increases greatly on those PHY types, which can lead to a timeout. Fixes: 9aeefed05538 ("i40e/base: support ESS") Signed-off-by: Helin Zhang Acked-by: Jingjing Wu Acked-by: Remy Horton --- diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c index a4cf5cfc3c..925bb1c187 100644 --- a/drivers/net/i40e/base/i40e_common.c +++ b/drivers/net/i40e/base/i40e_common.c @@ -1316,11 +1316,11 @@ enum i40e_status_code i40e_pf_reset(struct i40e_hw *hw) grst_del = (rd32(hw, I40E_GLGEN_RSTCTL) & I40E_GLGEN_RSTCTL_GRSTDEL_MASK) >> I40E_GLGEN_RSTCTL_GRSTDEL_SHIFT; -#ifdef I40E_ESS_SUPPORT + /* It can take upto 15 secs for GRST steady state */ grst_del = grst_del * 20; /* bump it to 16 secs max to be safe */ -#endif - for (cnt = 0; cnt < grst_del + 10; cnt++) { + + for (cnt = 0; cnt < grst_del; cnt++) { reg = rd32(hw, I40E_GLGEN_RSTAT); if (!(reg & I40E_GLGEN_RSTAT_DEVSTATE_MASK)) break;