mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Huazhong Tan <tanhuazhong@huawei.com>
To: <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<salil.mehta@huawei.com>, <yisen.zhuang@huawei.com>,
	<huangdaode@huawei.com>, <linuxarm@huawei.com>, <kuba@kernel.org>,
	Huazhong Tan <tanhuazhong@huawei.com>
Subject: [PATCH net-next 3/9] net: hns3: set VF's default reset_type to HNAE3_NONE_RESET
Date: Tue, 21 Jan 2020 16:42:07 +0800	[thread overview]
Message-ID: <1579596133-54842-4-git-send-email-tanhuazhong@huawei.com> (raw)
In-Reply-To: <1579596133-54842-1-git-send-email-tanhuazhong@huawei.com>

reset_type means what kind of reset the driver is handling now,
so after initializing or reset, the reset_type of VF should be
set to HNAE3_NONE_RESET, otherwise, this unknown default value
may be a little misleading when the device is running.

Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
---
 drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
index b26b8ad..2a472b0 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
@@ -1862,6 +1862,7 @@ static void hclgevf_reset_service_task(struct hclgevf_dev *hdev)
 		hclgevf_reset_task_schedule(hdev);
 	}
 
+	hdev->reset_type = HNAE3_NONE_RESET;
 	clear_bit(HCLGEVF_STATE_RST_HANDLING, &hdev->state);
 	up(&hdev->reset_sem);
 }
@@ -2742,6 +2743,7 @@ static int hclgevf_init_hdev(struct hclgevf_dev *hdev)
 
 	hclgevf_state_init(hdev);
 	hdev->reset_level = HNAE3_VF_FUNC_RESET;
+	hdev->reset_type = HNAE3_NONE_RESET;
 
 	ret = hclgevf_misc_irq_init(hdev);
 	if (ret) {
-- 
2.7.4


  parent reply	other threads:[~2020-01-21  8:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-21  8:42 [PATCH net-next 0/9] net: hns3: misc updates for -net-next Huazhong Tan
2020-01-21  8:42 ` [PATCH net-next 1/9] net: hns3: limit the error logging in the hns3_clean_tx_ring() Huazhong Tan
2020-01-21  8:42 ` [PATCH net-next 2/9] net: hns3: do not reuse pfmemalloc pages Huazhong Tan
2020-01-21  8:42 ` Huazhong Tan [this message]
2020-01-21  8:42 ` [PATCH net-next 4/9] net: hns3: move duplicated macro definition into header Huazhong Tan
2020-01-21  8:42 ` [PATCH net-next 5/9] net: hns3: refine the input parameter 'size' for snprintf() Huazhong Tan
2020-01-21  8:42 ` [PATCH net-next 6/9] net: hns3: rewrite a log in hclge_put_vector() Huazhong Tan
2020-01-21  8:42 ` [PATCH net-next 7/9] net: hns3: delete unnecessary blank line and space for cleanup Huazhong Tan
2020-01-21  8:42 ` [PATCH net-next 8/9] net: hns3: remove redundant print on ENOMEM Huazhong Tan
2020-01-21  8:42 ` [PATCH net-next 9/9] net: hns3: cleanup some coding style issue Huazhong Tan
2020-01-21 10:46 ` [PATCH net-next 0/9] net: hns3: misc updates for -net-next 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=1579596133-54842-4-git-send-email-tanhuazhong@huawei.com \
    --to=tanhuazhong@huawei.com \
    --cc=davem@davemloft.net \
    --cc=huangdaode@huawei.com \
    --cc=kuba@kernel.org \
    --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

all inboxes | Powered by JetHome®