Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1872393yba; Thu, 25 Apr 2019 07:06:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqwUs1LbQ45R3oSnHrOUU26jnqR71IptaW698K2mYU7gCTs8MjYxxavOT4A1c1flgiSIP3iF X-Received: by 2002:a62:6c43:: with SMTP id h64mr40850720pfc.123.1556201188852; Thu, 25 Apr 2019 07:06:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556201188; cv=none; d=google.com; s=arc-20160816; b=zaBbJOyysmwZ8HnbIIINDQ8p+jTCgBf15AiH+DTB4pAyrgXYWLAYPvpTw5yBaB0581 I8Stb491AkuSBlH7WnBVOH4Yk8ykeAjtnX1jGG0KnAVmr7jcfmDBMUV1VzkCPwjVpQSm 7TMrsyAslzATbzgSnJg7N6gr2jMO6vtb7MJI8Sf7dJUJSuAD7ZtTWyc2NE5qSHqHia0W daya8oaWPGBZKKWSRIzDtfziNqmXvbxo6FsiyJl6hs3hpLiNiy9AcoTxH2CTDp4wuNln Sw4b2NZurYV4ihLfr/vp8XpT61R5Bj6ufeXw2WfuIYTRHLPYY9g+N9fCMMN7BCtIvNMM Gb/Q== 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=nXc09BRSrG3Tt/qiLyZyBhcLsEAFaL6Hn/6OCPOYYJQ=; b=sDeJ8hz+/jfdjxhHu3T/4oRbuN5bHqxtPtzktLIw4eyPMHgSjqguGkLYgHCs39m2cC aM0CgRSkga1+OXEoxnKfrb32TbpkOmbL1hA3BfWFt172IwAJhLy8x4uNH8cAP/h2+4fy Kg9+7LZhG5LDPBhApe0affNeEAsP6sNmDT7IryKkGHQ1p717mKmv1LN8zCmWJlVsyojk B2lW7Ly96cYvrC8cHCsdSdJPpiVDTR419MbGstC7mr38ORimoZKy3/SrW+Ld6FLewp0O kgjtgL5LitVDz3J4laxy59Vn/CgxHMS9f5FdujuCBMAZlU2+AXtGwJRn4sbmfWl3xsO3 uotQ== 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 l1si22901156plb.423.2019.04.25.07.06.12; Thu, 25 Apr 2019 07:06:28 -0700 (PDT) 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 S2387913AbfDYMog (ORCPT + 99 others); Thu, 25 Apr 2019 08:44:36 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:7255 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731422AbfDYMoT (ORCPT ); Thu, 25 Apr 2019 08:44:19 -0400 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 6684B59333214A1AC10E; Thu, 25 Apr 2019 20:44:14 +0800 (CST) Received: from localhost.localdomain (10.67.212.132) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.439.0; Thu, 25 Apr 2019 20:44:04 +0800 From: Huazhong Tan To: CC: , , , , , , Huazhong Tan , Peng Li 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 Message-ID: <1556196175-65389-8-git-send-email-tanhuazhong@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1556196175-65389-1-git-send-email-tanhuazhong@huawei.com> References: <1556196175-65389-1-git-send-email-tanhuazhong@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.212.132] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Signed-off-by: Peng Li --- 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