From: Alice Michael <alice.michael@intel.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [next PATCH S82-V4 6/9] i40e: Fix FLR reset timeout issue
Date: Tue, 14 Nov 2017 07:00:49 -0500 [thread overview]
Message-ID: <20171114120052.86665-6-alice.michael@intel.com> (raw)
In-Reply-To: <20171114120052.86665-1-alice.michael@intel.com>
From: Filip Sadowski <filip.sadowski@intel.com>
This patch allows detection of upcoming core reset in case NIC gets
stuck while performing FLR reset. The i40e_pf_reset() function returns
I40E_ERR_NOT_READY when global reset was detected.
Signed-off-by: Filip Sadowski <filip.sadowski@intel.com>
---
drivers/net/ethernet/intel/i40e/i40e_common.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_common.c b/drivers/net/ethernet/intel/i40e/i40e_common.c
index 5abc83c..40c5f76 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_common.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_common.c
@@ -1269,6 +1269,7 @@ i40e_status i40e_pf_reset(struct i40e_hw *hw)
* we don't need to do the PF Reset
*/
if (!cnt) {
+ u32 reg2 = 0;
if (hw->revision_id == 0)
cnt = I40E_PF_RESET_WAIT_COUNT_A0;
else
@@ -1280,6 +1281,12 @@ i40e_status i40e_pf_reset(struct i40e_hw *hw)
reg = rd32(hw, I40E_PFGEN_CTRL);
if (!(reg & I40E_PFGEN_CTRL_PFSWR_MASK))
break;
+ reg2 = rd32(hw, I40E_GLGEN_RSTAT);
+ if (reg2 & I40E_GLGEN_RSTAT_DEVSTATE_MASK) {
+ hw_dbg(hw, "Core reset upcoming. Skipping PF reset request.\n");
+ hw_dbg(hw, "I40E_GLGEN_RSTAT = 0x%x\n", reg2);
+ return I40E_ERR_NOT_READY;
+ }
usleep_range(1000, 2000);
}
if (reg & I40E_PFGEN_CTRL_PFSWR_MASK) {
--
2.9.5
next prev parent reply other threads:[~2017-11-14 12:00 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-14 12:00 [Intel-wired-lan] [next PATCH S82-V4 1/9] i40evf: Do not clear MSI-X PBA manually Alice Michael
2017-11-14 12:00 ` [Intel-wired-lan] [next PATCH S82-V4 2/9] i40evf: Clean-up flags for promisc mode to avoid high polling rate Alice Michael
2017-11-16 22:19 ` Bowers, AndrewX
2017-11-14 12:00 ` [Intel-wired-lan] [next PATCH S82-V4 3/9] i40evf: Drop i40evf_fire_sw_int as it is prone to races Alice Michael
2017-11-14 23:03 ` Shannon Nelson
2017-11-16 22:20 ` Bowers, AndrewX
2017-11-14 12:00 ` [Intel-wired-lan] [next PATCH S82-V4 4/9] i40e: change ppp name to ddp Alice Michael
2017-11-16 22:20 ` Bowers, AndrewX
2017-11-14 12:00 ` [Intel-wired-lan] [next PATCH S82-V4 5/9] i40e: track id can be 0 Alice Michael
2017-11-16 22:21 ` Bowers, AndrewX
2017-11-14 12:00 ` Alice Michael [this message]
2017-11-16 22:22 ` [Intel-wired-lan] [next PATCH S82-V4 6/9] i40e: Fix FLR reset timeout issue Bowers, AndrewX
2017-11-14 12:00 ` [Intel-wired-lan] [next PATCH S82-V4 7/9] i40e: link_down_on_close private flag support Alice Michael
2017-11-16 22:23 ` Bowers, AndrewX
2017-11-14 12:00 ` [Intel-wired-lan] [next PATCH S82-V4 8/9] i40evf: fix client notify of l2 params Alice Michael
2017-11-16 22:24 ` Bowers, AndrewX
2017-11-14 12:00 ` [Intel-wired-lan] [next PATCH S82-V4 9/9] i40e: restore promiscuous after reset Alice Michael
2017-11-16 22:25 ` Bowers, AndrewX
2017-11-16 22:18 ` [Intel-wired-lan] [next PATCH S82-V4 1/9] i40evf: Do not clear MSI-X PBA manually Bowers, AndrewX
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=20171114120052.86665-6-alice.michael@intel.com \
--to=alice.michael@intel.com \
--cc=intel-wired-lan@osuosl.org \
/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