Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3717325imu; Tue, 18 Dec 2018 03:04:34 -0800 (PST) X-Google-Smtp-Source: AFSGD/WfLNtGwiKjwVrV8CFbsf5qB64lQGmvQETKr7TwrlsfScKAVxEbjqPBxgy+LYZbDFLQDSnz X-Received: by 2002:a63:1f1c:: with SMTP id f28mr2927949pgf.193.1545131074397; Tue, 18 Dec 2018 03:04:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545131074; cv=none; d=google.com; s=arc-20160816; b=qXhkb/XT13zLfhYm6H47EW4rOUqQbCOmcO1+AneKv6jsynoV/+QzUpJwXlPve1Md1m uWEvh318dWXBCJGbpUvuP78rHrOovb7is5MSBeIFEN2s8lPmvSQQEUKxGv5BC2UHUy1b DjFM3dMewpXH6bjdH2sNpqegrAqpPhX7zuZXUvywXncN2QiASrsqwIOyAl7Q7UZnW1pJ 72VyNUf3f2Oi+dPDwiOeEG9sPoBoAkusGDkVC7s1J6PogoqJMKKeeE1o4PBEZPqQTfJw bqhigFgwSpYGmbBmFNaNzdHvBDhlK6yYk/4E9NjdmMnbUaOr0lpq8xiTanhwxw+sYmgB 0Jnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=vUGJrWYP132U3MzAEuKEGtHqK/bDgk+BsZKbrp0puFg=; b=Y0yMwfzmYZ8V1/tXvEuveT1EW6SrYAh5PQoC5PN35yYdukKnHLwy9TwXdIdV/v0kP3 m5yKzNPt3dZ0D2Fzt0L6yD7YLmR5HZLnnDPVl9x2p/Y2XWCiP3VaF6RfTsqvnj2E8/4U PM1jYHhPDr9wKn7WjtpD42DUOV9Yf0DJhL09CS0RF+x1g8bkqYn9GEeziI0i7tuGxBqM VhZekJBYnUBDQQFHdXRmY2xmpk/GWSKW6s8unjsN45lprCjWY7vrI8Y9XA+zgkhBWl7z i+gScVf0OYRXTkm0NaoD7RfkRfIzwfNcKnmEkHuI7pEfjqve82oF3SdG5dpf05XBN8mP TEzA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q73si9352340pfi.205.2018.12.18.03.04.16; Tue, 18 Dec 2018 03:04:34 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726726AbeLRLCK (ORCPT + 99 others); Tue, 18 Dec 2018 06:02:10 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:38229 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726704AbeLRLCJ (ORCPT ); Tue, 18 Dec 2018 06:02:09 -0500 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id EEB7D105ED591; Tue, 18 Dec 2018 19:02:03 +0800 (CST) Received: from linux-ioko.site (10.71.200.31) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.408.0; Tue, 18 Dec 2018 19:01:57 +0800 From: Peng Li To: CC: , , , , , 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 Message-ID: <1545133079-79605-5-git-send-email-lipeng321@huawei.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1545133079-79605-1-git-send-email-lipeng321@huawei.com> References: <1545133079-79605-1-git-send-email-lipeng321@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.71.200.31] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Huazhong Tan 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 Signed-off-by: Peng Li --- 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