netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: zyjzyj2000@gmail.com
To: e1000-devel@lists.sourceforge.net, netdev@vger.kernel.org,
	jeffrey.t.kirsher@intel.com, donald.c.skidmore@intel.com
Cc: Zhu Yanjun <zyjzyj2000@gmail.com>
Subject: [PATCH 1/1] ixgbevf: avoid checking hang when performing hardware reset
Date: Tue, 19 Jul 2016 21:31:53 +0800	[thread overview]
Message-ID: <1468935113-3051-2-git-send-email-zyjzyj2000@gmail.com> (raw)
In-Reply-To: <1468935113-3051-1-git-send-email-zyjzyj2000@gmail.com>

From: Zhu Yanjun <zyjzyj2000@gmail.com>

When performing hardware reset, it is not necessary to check hang.
Or else, the call trace will appear.

Signed-off-by: Zhu Yanjun <zyjzyj2000@gmail.com>
---
 drivers/net/ethernet/intel/ixgbevf/ixgbevf.h      | 1 +
 drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 5 +++--
 drivers/net/ethernet/intel/ixgbevf/vf.c           | 5 +++++
 3 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h b/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h
index d5944c3..60fc63b 100644
--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h
+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h
@@ -446,6 +446,7 @@ enum ixbgevf_state_t {
 	__IXGBEVF_SERVICE_INITED,
 	__IXGBEVF_RESET_REQUESTED,
 	__IXGBEVF_QUEUE_RESET_REQUESTED,
+	__IXGBEVF_HW_RESETTING,
 };
 
 enum ixgbevf_boards {
diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
index acc2401..530005b 100644
--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
@@ -2795,9 +2795,10 @@ static void ixgbevf_check_hang_subtask(struct ixgbevf_adapter *adapter)
 	u32 eics = 0;
 	int i;
 
-	/* If we're down or resetting, just bail */
+	/* If we're down, resetting or hw resetting, just bail */
 	if (test_bit(__IXGBEVF_DOWN, &adapter->state) ||
-	    test_bit(__IXGBEVF_RESETTING, &adapter->state))
+	    test_bit(__IXGBEVF_RESETTING, &adapter->state) ||
+	    test_bit(__IXGBEVF_HW_RESETTING, &adapter->state))
 		return;
 
 	/* Force detection of hung controller */
diff --git a/drivers/net/ethernet/intel/ixgbevf/vf.c b/drivers/net/ethernet/intel/ixgbevf/vf.c
index e670d3b..4ec4484 100644
--- a/drivers/net/ethernet/intel/ixgbevf/vf.c
+++ b/drivers/net/ethernet/intel/ixgbevf/vf.c
@@ -80,6 +80,9 @@ static s32 ixgbevf_reset_hw_vf(struct ixgbe_hw *hw)
 	s32 ret_val = IXGBE_ERR_INVALID_MAC_ADDR;
 	u32 msgbuf[IXGBE_VF_PERMADDR_MSG_LEN];
 	u8 *addr = (u8 *)(&msgbuf[1]);
+	struct ixgbevf_adapter *adapter = hw->back;
+
+	set_bit(__IXGBEVF_HW_RESETTING, &adapter->state);
 
 	/* Call adapter stop to disable tx/rx and clear interrupts */
 	hw->mac.ops.stop_adapter(hw);
@@ -128,6 +131,8 @@ static s32 ixgbevf_reset_hw_vf(struct ixgbe_hw *hw)
 
 	hw->mac.mc_filter_type = msgbuf[IXGBE_VF_MC_TYPE_WORD];
 
+	clear_bit(__IXGBEVF_HW_RESETTING, &adapter->state);
+
 	return 0;
 }
 
-- 
2.7.4

  reply	other threads:[~2016-07-20  2:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-18 13:44 [PATCH 1/1] ixgbevf: avoid checking hang when performing hardware reset zyjzyj2000
2016-07-18 22:30 ` [E1000-devel] " Skidmore, Donald C
2016-07-19 13:31   ` (unknown), zyjzyj2000
2016-07-19 13:31     ` zyjzyj2000 [this message]
2016-07-20  2:42   ` [PATCH 1/1] ixgbevf: avoid checking hang when performing hardware reset zhuyj
  -- strict thread matches above, loose matches on Subject: below --
2016-07-19 23:23 [V2 PATCH 1/1] ixgbevf: avoid checking hang when performing hardware zyjzyj2000
2016-07-19 23:23 ` [PATCH 1/1] ixgbevf: avoid checking hang when performing hardware reset zyjzyj2000

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=1468935113-3051-2-git-send-email-zyjzyj2000@gmail.com \
    --to=zyjzyj2000@gmail.com \
    --cc=donald.c.skidmore@intel.com \
    --cc=e1000-devel@lists.sourceforge.net \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=netdev@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).