[dpdk-dev] [PATCH 44/52] i40e/base: ESS Support
Jingjing Wu
jingjing.wu at intel.com
Sun Sep 6 09:11:58 CEST 2015
Add some delays specific to ESS/Veloce system.
This patch requires driver changes to define ESS_SUPPORT.
Signed-off-by: Jingjing Wu <jingjing.wu at intel.com>
---
drivers/net/i40e/base/i40e_adminq.h | 3 +++
drivers/net/i40e/base/i40e_common.c | 6 +++++-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/net/i40e/base/i40e_adminq.h b/drivers/net/i40e/base/i40e_adminq.h
index 1ac054e..40c86d9 100644
--- a/drivers/net/i40e/base/i40e_adminq.h
+++ b/drivers/net/i40e/base/i40e_adminq.h
@@ -160,6 +160,9 @@ STATIC INLINE int i40e_aq_rc_to_posix(int aq_ret, int aq_rc)
/* general information */
#define I40E_AQ_LARGE_BUF 512
#define I40E_ASQ_CMD_TIMEOUT 250 /* msecs */
+#ifdef I40E_ESS_SUPPORT
+#define I40E_ASQ_CMD_TIMEOUT_ESS 50000 /* msecs */
+#endif
void i40e_fill_default_direct_cmd_desc(struct i40e_aq_desc *desc,
u16 opcode);
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 320428f..4c995fc 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -1303,7 +1303,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;
- for (cnt = 0; cnt < grst_del + 2; cnt++) {
+#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++) {
reg = rd32(hw, I40E_GLGEN_RSTAT);
if (!(reg & I40E_GLGEN_RSTAT_DEVSTATE_MASK))
break;
--
2.4.0
More information about the dev
mailing list