netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peng Li <lipeng321@huawei.com>
To: <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linuxarm@huawei.com>, <yisen.zhuang@huawei.com>,
	<salil.mehta@huawei.com>, <lipeng321@huawei.com>
Subject: [PATCH net-next 04/12] net: hns3: update some variables while hclge_reset()/hclgevf_reset() done
Date: Tue, 18 Dec 2018 19:37:51 +0800	[thread overview]
Message-ID: <1545133079-79605-5-git-send-email-lipeng321@huawei.com> (raw)
In-Reply-To: <1545133079-79605-1-git-send-email-lipeng321@huawei.com>

From: Huazhong Tan <tanhuazhong@huawei.com>

When hclge_reset() completes successfully, it should update the
last_reset_time, set reset_fail_cnt to 0, and set reset_type of
hnae3_ae_dev to HNAE3_NONE_RESET.

Also when hclgevf_reset() completes successfully, it should update
the last_reset_time, and set reset_type of hnae3_ae_dev to
HNAE3_NONE_RESET.

Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
---
 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c   | 5 ++++-
 drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 3 +++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
index 3fe08cf..a8a2ccf 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
@@ -2810,7 +2810,6 @@ static void hclge_reset(struct hclge_dev *hdev)
 	 */
 	ae_dev->reset_type = hdev->reset_type;
 	hdev->reset_count++;
-	hdev->last_reset_time = jiffies;
 	/* perform reset of the stack & ae device for a client */
 	ret = hclge_notify_roce_client(hdev, HNAE3_DOWN_CLIENT);
 	if (ret)
@@ -2873,6 +2872,10 @@ static void hclge_reset(struct hclge_dev *hdev)
 	if (ret)
 		goto err_reset;
 
+	hdev->last_reset_time = jiffies;
+	hdev->reset_fail_cnt = 0;
+	ae_dev->reset_type = HNAE3_NONE_RESET;
+
 	return;
 
 err_reset_lock:
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
index 86596ee..54ba93a 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
@@ -1342,6 +1342,9 @@ static int hclgevf_reset(struct hclgevf_dev *hdev)
 
 	rtnl_unlock();
 
+	hdev->last_reset_time = jiffies;
+	ae_dev->reset_type = HNAE3_NONE_RESET;
+
 	return ret;
 err_reset_lock:
 	rtnl_unlock();
-- 
1.9.1

  parent reply	other threads:[~2018-12-18 11:37 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-18 11:37 [PATCH net-next 00/12] net: hns3: code optimizations & bugfixes for HNS3 driver Peng Li
2018-12-18 11:37 ` [PATCH net-next 01/12] net: hns3: fix error handling int the hns3_get_vector_ring_chain Peng Li
2018-12-18 11:37 ` [PATCH net-next 02/12] net: hns3: uninitialize pci in the hclgevf_uninit Peng Li
2018-12-18 11:37 ` [PATCH net-next 03/12] net: hns3: fix napi_disable not return problem Peng Li
2018-12-18 11:37 ` Peng Li [this message]
2018-12-18 11:37 ` [PATCH net-next 05/12] net: hns3: remove unnecessary configuration recapture while resetting Peng Li
2018-12-18 11:37 ` [PATCH net-next 06/12] net: hns3: fix incomplete uninitialization of IRQ in the hns3_nic_uninit_vector_data() Peng Li
2018-12-18 11:37 ` [PATCH net-next 07/12] net: hns3: update coalesce param per second Peng Li
2018-12-18 11:37 ` [PATCH net-next 08/12] net: hns3: remove 1000M/half support of phy Peng Li
2018-12-18 11:37 ` [PATCH net-next 09/12] net: hns3: synchronize speed and duplex from phy when phy link up Peng Li
2018-12-18 11:37 ` [PATCH net-next 10/12] net: hns3: getting tx and dv buffer size through firmware Peng Li
2018-12-18 11:37 ` [PATCH net-next 11/12] net: hns3: aligning buffer size in SSU to 256 bytes Peng Li
2018-12-18 11:37 ` [PATCH net-next 12/12] net: hns3: fix a SSU buffer checking bug Peng Li
2018-12-18 20:01 ` [PATCH net-next 00/12] net: hns3: code optimizations & bugfixes for HNS3 driver 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=1545133079-79605-5-git-send-email-lipeng321@huawei.com \
    --to=lipeng321@huawei.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=netdev@vger.kernel.org \
    --cc=salil.mehta@huawei.com \
    --cc=yisen.zhuang@huawei.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).