netdev.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>, <linuxarm@huawei.com>,
	<salil.mehta@huawei.com>, <yisen.zhuang@huawei.com>,
	<lipeng321@huawei.com>, Huazhong Tan <tanhuazhong@huawei.com>
Subject: [Patch net 05/11] net: hns3: remove unnecessary queue reset in the hns3_uninit_all_ring()
Date: Sat, 27 Oct 2018 10:41:52 +0800	[thread overview]
Message-ID: <1540608118-27449-6-git-send-email-tanhuazhong@huawei.com> (raw)
In-Reply-To: <1540608118-27449-1-git-send-email-tanhuazhong@huawei.com>

It is not necessary to reset the queue in the hns3_uninit_all_ring(),
since the queue is stopped in the down operation, and will be resetted
in the up operaton. And the judgment of the HCLGE_STATE_RST_HANDLING
flag in the hclge_reset_tqp() is not correct, because we need to reset
tqp during pf reset, otherwise it may cause queue not be resetted to
working state problem.

Fixes: 76ad4f0ee747 ("net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC")
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
---
 drivers/net/ethernet/hisilicon/hns3/hns3_enet.c         | 3 ---
 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 3 ---
 2 files changed, 6 deletions(-)

diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
index 6f0fd62..a80ecfb 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
@@ -3240,9 +3240,6 @@ int hns3_uninit_all_ring(struct hns3_nic_priv *priv)
 	int i;
 
 	for (i = 0; i < h->kinfo.num_tqps; i++) {
-		if (h->ae_algo->ops->reset_queue)
-			h->ae_algo->ops->reset_queue(h, i);
-
 		hns3_fini_ring(priv->ring_data[i].ring);
 		hns3_fini_ring(priv->ring_data[i + h->kinfo.num_tqps].ring);
 	}
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
index 2a63147..4dd0506 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
@@ -6116,9 +6116,6 @@ void hclge_reset_tqp(struct hnae3_handle *handle, u16 queue_id)
 	u16 queue_gid;
 	int ret;
 
-	if (test_bit(HCLGE_STATE_RST_HANDLING, &hdev->state))
-		return;
-
 	queue_gid = hclge_covert_handle_qid_global(handle, queue_id);
 
 	ret = hclge_tqp_enable(hdev, queue_id, 0, false);
-- 
2.7.4

  parent reply	other threads:[~2018-10-27 11:21 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-27  2:41 [Patch net 00/11] Bugfix for the HNS3 driver Huazhong Tan
2018-10-27  2:41 ` [Patch net 01/11] net: hns3: add error handler for hns3_nic_init_vector_data() Huazhong Tan
2018-10-27  2:41 ` [Patch net 02/11] net: hns3: add error handler for hns3_get_ring_config/hns3_queue_to_ring Huazhong Tan
2018-10-27  2:41 ` [Patch net 03/11] net: hns3: bugfix for reporting unknown vector0 interrupt repeatly problem Huazhong Tan
2018-10-27  2:41 ` [Patch net 04/11] net: hns3: bugfix for the initialization of command queue's spin lock Huazhong Tan
2018-10-27  2:41 ` Huazhong Tan [this message]
2018-10-27 19:02   ` [Patch net 05/11] net: hns3: remove unnecessary queue reset in the hns3_uninit_all_ring() Sergei Shtylyov
2018-10-28  2:19     ` tanhuazhong
2018-10-27  2:41 ` [Patch net 06/11] net: hns3: bugfix for is_valid_csq_clean_head() Huazhong Tan
2018-10-27  2:41 ` [Patch net 07/11] net: hns3: bugfix for hclge_mdio_write and hclge_mdio_read Huazhong Tan
2018-10-27  2:41 ` [Patch net 08/11] net: hns3: fix incorrect return value/type of some functions Huazhong Tan
2018-10-27  4:10   ` kbuild test robot
2018-10-27  2:41 ` [Patch net 09/11] net: hns3: bugfix for handling mailbox while the command queue reinitialized Huazhong Tan
2018-10-27 19:05   ` Sergei Shtylyov
2018-10-28  2:20     ` tanhuazhong
2018-10-27  2:41 ` [Patch net 10/11] net: hns3: bugfix for rtnl_lock's range in the hclge_reset() Huazhong Tan
2018-10-27  2:41 ` [Patch net 11/11] net: hns3: bugfix for rtnl_lock's range in the hclgevf_reset() Huazhong Tan

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=1540608118-27449-6-git-send-email-tanhuazhong@huawei.com \
    --to=tanhuazhong@huawei.com \
    --cc=davem@davemloft.net \
    --cc=linuxarm@huawei.com \
    --cc=lipeng321@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).