All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-wired-lan] [next PATCH S85-V1 06/14] i40e: Add delay after EMP reset for firmware to recover
@ 2017-12-29 13:50 Alice Michael
  2018-01-05 19:27 ` Bowers, AndrewX
  0 siblings, 1 reply; 2+ messages in thread
From: Alice Michael @ 2017-12-29 13:50 UTC (permalink / raw
  To: intel-wired-lan

From: Filip Sadowski <filip.sadowski@intel.com>

This patch adds necessary delay for 4.33 firmware to recover after
EMP reset. Without this patch driver occasionally reinitializes
structures too quickly to communicate with firmware after EMP reset
causing AdminQ to timeout.

Signed-off-by: Filip Sadowski <filip.sadowski@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index fdf0bfb..c810e9d 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -9259,6 +9259,17 @@ static void i40e_rebuild(struct i40e_pf *pf, bool reinit, bool lock_acquired)
 	}
 	i40e_get_oem_version(&pf->hw);
 
+	if (test_bit(__I40E_EMP_RESET_INTR_RECEIVED, pf->state) &&
+	    ((hw->aq.fw_maj_ver == 4 && hw->aq.fw_min_ver <= 33) ||
+	     hw->aq.fw_maj_ver < 4) && hw->mac.type == I40E_MAC_XL710) {
+		/* The following delay is necessary for 4.33 firmware and older
+		 * to recover after EMP reset. 200 ms should suffice but we
+		 * put here 300 ms to be sure that FW is ready to operate
+		 * after reset.
+		 */
+		mdelay(300);
+	}
+
 	/* re-verify the eeprom if we just had an EMP reset */
 	if (test_and_clear_bit(__I40E_EMP_RESET_INTR_RECEIVED, pf->state))
 		i40e_verify_eeprom(pf);
-- 
2.9.5


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Intel-wired-lan] [next PATCH S85-V1 06/14] i40e: Add delay after EMP reset for firmware to recover
  2017-12-29 13:50 [Intel-wired-lan] [next PATCH S85-V1 06/14] i40e: Add delay after EMP reset for firmware to recover Alice Michael
@ 2018-01-05 19:27 ` Bowers, AndrewX
  0 siblings, 0 replies; 2+ messages in thread
From: Bowers, AndrewX @ 2018-01-05 19:27 UTC (permalink / raw
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On
> Behalf Of Alice Michael
> Sent: Friday, December 29, 2017 5:50 AM
> To: Michael, Alice <alice.michael@intel.com>; intel-wired-
> lan at lists.osuosl.org
> Cc: Sadowski, Filip <filip.sadowski@intel.com>
> Subject: [Intel-wired-lan] [next PATCH S85-V1 06/14] i40e: Add delay after
> EMP reset for firmware to recover
> 
> From: Filip Sadowski <filip.sadowski@intel.com>
> 
> This patch adds necessary delay for 4.33 firmware to recover after EMP reset.
> Without this patch driver occasionally reinitializes structures too quickly to
> communicate with firmware after EMP reset causing AdminQ to timeout.
> 
> Signed-off-by: Filip Sadowski <filip.sadowski@intel.com>
> ---
>  drivers/net/ethernet/intel/i40e/i40e_main.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)

Tested-by: Andrew Bowers <andrewx.bowers@intel.com>



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-01-05 19:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-29 13:50 [Intel-wired-lan] [next PATCH S85-V1 06/14] i40e: Add delay after EMP reset for firmware to recover Alice Michael
2018-01-05 19:27 ` Bowers, AndrewX

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.