linux-kernel.vger.kernel.org archive mirror
 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>,
	<linuxarm@huawei.com>, <nhorman@redhat.com>,
	Huazhong Tan <tanhuazhong@huawei.com>,
	Peng Li <lipeng321@huawei.com>
Subject: [PATCH V3 net-next 07/11] net: hns3: not reset TQP in the DOWN while VF resetting
Date: Thu, 25 Apr 2019 20:42:51 +0800	[thread overview]
Message-ID: <1556196175-65389-8-git-send-email-tanhuazhong@huawei.com> (raw)
In-Reply-To: <1556196175-65389-1-git-send-email-tanhuazhong@huawei.com>

Since the hardware does not handle mailboxes and the hardware
reset include TQP reset, so it is unnecessary to reset TQP
in the hclgevf_ae_stop() while doing VF reset. Also it is
unnecessary to reset the remaining TQP when one reset fails.

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

diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
index 7672cab..6ce5b03 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
@@ -2050,8 +2050,10 @@ static void hclgevf_ae_stop(struct hnae3_handle *handle)
 
 	set_bit(HCLGEVF_STATE_DOWN, &hdev->state);
 
-	for (i = 0; i < handle->kinfo.num_tqps; i++)
-		hclgevf_reset_tqp(handle, i);
+	if (hdev->reset_type != HNAE3_VF_RESET)
+		for (i = 0; i < handle->kinfo.num_tqps; i++)
+			if (hclgevf_reset_tqp(handle, i))
+				break;
 
 	/* reset tqp stats */
 	hclgevf_reset_tqp_stats(handle);
-- 
2.7.4


  parent reply	other threads:[~2019-04-25 12:44 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-25 12:42 [PATCH V3 net-next 00/11] code optimizations & bugfixes for HNS3 driver Huazhong Tan
2019-04-25 12:42 ` [PATCH V3 net-next 01/11] net: hns3: fix data race between ring->next_to_clean Huazhong Tan
2019-04-25 12:42 ` [PATCH V3 net-next 02/11] net: hns3: fix for TX clean num when cleaning TX BD Huazhong Tan
2019-04-25 12:42 ` [PATCH V3 net-next 03/11] net: hns3: handle the BD info on the last BD of the packet Huazhong Tan
2019-04-25 12:42 ` [PATCH V3 net-next 04/11] net: hns3: stop sending keep alive msg when VF command queue needs reinit Huazhong Tan
2019-04-25 12:42 ` [PATCH V3 net-next 05/11] net: hns3: use atomic_t replace u32 for arq's count Huazhong Tan
2019-04-25 12:42 ` [PATCH V3 net-next 06/11] net: hns3: use a reserved byte to identify need_resp flag Huazhong Tan
2019-04-25 12:42 ` Huazhong Tan [this message]
2019-04-25 12:42 ` [PATCH V3 net-next 08/11] net: hns3: fix pause configure fail problem Huazhong Tan
2019-04-25 12:42 ` [PATCH V3 net-next 09/11] net: hns3: extend the loopback state acquisition time Huazhong Tan
2019-04-25 12:42 ` [PATCH V3 net-next 10/11] net: hns3: prevent double free in hns3_put_ring_config() Huazhong Tan
2019-04-25 12:42 ` [PATCH V3 net-next 11/11] net: hns3: remove reset after command send failed Huazhong Tan
2019-04-25 20:40 ` [PATCH V3 net-next 00/11] code optimizations & bugfixes for HNS3 driver Jakub Kicinski
2019-04-26 16:13 ` 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=1556196175-65389-8-git-send-email-tanhuazhong@huawei.com \
    --to=tanhuazhong@huawei.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=lipeng321@huawei.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@redhat.com \
    --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).