From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Filip Sadowski <filip.sadowski@intel.com>,
netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com,
jogreene@redhat.com, Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next 04/12] i40e: Add delay after EMP reset for firmware to recover
Date: Mon, 12 Feb 2018 12:46:41 -0800 [thread overview]
Message-ID: <20180212204649.24178-5-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <20180212204649.24178-1-jeffrey.t.kirsher@intel.com>
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>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@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 005a6d6a20fb..a88fdb8bf5f0 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -9215,6 +9215,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.14.3
next prev parent reply other threads:[~2018-02-12 20:46 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-12 20:46 [net-next 00/12][pull request] 40GbE Intel Wired LAN Driver Updates 2018-02-12 Jeff Kirsher
2018-02-12 20:46 ` [net-next 01/12] i40e: fix typo in function description Jeff Kirsher
2018-02-12 20:46 ` [net-next 02/12] i40e/i40evf: Only track one ITR setting per ring instead of Tx/Rx Jeff Kirsher
2018-02-12 20:46 ` [net-next 03/12] i40e/i40evf: Clean up logic for adaptive ITR Jeff Kirsher
2018-02-12 20:46 ` Jeff Kirsher [this message]
2018-02-12 20:46 ` [net-next 05/12] i40e: Warn when setting link-down-on-close while in MFP Jeff Kirsher
2018-02-12 20:46 ` [net-next 06/12] i40e: use changed_flags to check I40E_FLAG_DISABLE_FW_LLDP Jeff Kirsher
2018-02-12 20:46 ` [net-next 07/12] i40e/i40evf: Clean-up of bits related to using q_vector->reg_idx Jeff Kirsher
2018-02-12 20:46 ` [net-next 08/12] i40e/i40evf: Don't bother setting the CLEARPBA bit Jeff Kirsher
2018-02-12 20:46 ` [net-next 09/12] i40e/i40evf: Use usec value instead of reg value for ITR defines Jeff Kirsher
2018-02-12 20:46 ` [net-next 10/12] i40evf: Correctly populate rxitr_idx and txitr_idx Jeff Kirsher
2018-02-12 20:46 ` [net-next 11/12] i40e/i40evf: Split container ITR into current_itr and target_itr Jeff Kirsher
2018-02-12 20:46 ` [net-next 12/12] i40e/i40evf: Add support for new mechanism of updating adaptive ITR Jeff Kirsher
2018-02-13 1:04 ` [net-next 00/12][pull request] 40GbE Intel Wired LAN Driver Updates 2018-02-12 David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180212204649.24178-5-jeffrey.t.kirsher@intel.com \
--to=jeffrey.t.kirsher@intel.com \
--cc=davem@davemloft.net \
--cc=filip.sadowski@intel.com \
--cc=jogreene@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=nhorman@redhat.com \
--cc=sassmann@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).