Received: by 2002:a05:6a10:6d25:0:0:0:0 with SMTP id gq37csp1820659pxb; Mon, 13 Sep 2021 06:18:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwu8OZGdZF4oPmYFLBQbT8/H2h4sq1gXNEQWnLw/h7z3kYKmdaB3LOlDMVLpVci4KLjS7x5 X-Received: by 2002:a05:600c:1c9a:: with SMTP id k26mr2111079wms.106.1631539132219; Mon, 13 Sep 2021 06:18:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631539132; cv=none; d=google.com; s=arc-20160816; b=ZAEykLVdJ0HXujbfvOVedY/ZX7PzZayC7gni3/PICE7LiA62Cg2DAfjBQuImdaCOVE py639B5GFqunJiWZ/A36XsxpzNzsHzB8IjScI1eezTwmQfJnkXBIFSjYcxRH2kS7cp56 itoJq9JcVAmwpiXD8zSTIiNcaHNMe4mufkuI+W2bFSuEZ3c8CmAs27mUu/rCZ3mZm4/x PSbV8wUCBO0TrIVyY654W+1tsuuOd15/bKFdKEKL4VTJ6VIMckvuH7yM+0qe/uyuOHqa BbnEn1ZDLKImOvQ5nPTVI2OhlsqKkwFH6GOVOYDNc3X5ZaM55vU80mkUR6VDh+Yg2X9w OE+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=xVEQUvjFBU8vWrxe+C+PaqQyL6jw4mP+MeOcn2/aqOc=; b=hw1c+E+qAQl/L+Ez7Y6QxzZEpCEK/LdM06dzvm0E6UNUoGG0b8/ZOn/y2Y6+b0cTrm zbiHl6gFVKOxfVIfdQF2EOOOzlNqje6Mu/9VGrT/V27CZtz9AETJ8bi7UhHJu94rN7QV w5YVnVfMZLmhD8MJEPDU3+9PqvUxmbIF6RsZTTvI1iGFr4rZYJn/YUt44Rho6zv5S9Jv n2OxaSrL6c5AUOO/YwN29qjZN6eEGQ83h7aIBeGscHhK/VbTtfXbLRLHCWsrlyTm5Mdj Qm5+dfnlBLhv95s+kiHOngXGgsHXv3Ahhw8I+3L4tPHZdiQzAN3NG6e60uHY7pNAOBjd 2BhQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q17si8048175edd.627.2021.09.13.06.18.12; Mon, 13 Sep 2021 06:18:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236547AbhIMNQJ (ORCPT + 99 others); Mon, 13 Sep 2021 09:16:09 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:9860 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238549AbhIMNNu (ORCPT ); Mon, 13 Sep 2021 09:13:50 -0400 Received: from dggemv711-chm.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4H7Rc46h8Zz8yVn; Mon, 13 Sep 2021 21:08:04 +0800 (CST) Received: from kwepemm600016.china.huawei.com (7.193.23.20) by dggemv711-chm.china.huawei.com (10.1.198.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.8; Mon, 13 Sep 2021 21:12:29 +0800 Received: from localhost.localdomain (10.67.165.24) by kwepemm600016.china.huawei.com (7.193.23.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.8; Mon, 13 Sep 2021 21:12:29 +0800 From: Guangbin Huang To: , CC: , , , Subject: [PATCH net 4/6] net: hns3: disable mac in flr process Date: Mon, 13 Sep 2021 21:08:23 +0800 Message-ID: <20210913130825.27025-5-huangguangbin2@huawei.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913130825.27025-1-huangguangbin2@huawei.com> References: <20210913130825.27025-1-huangguangbin2@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.67.165.24] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To kwepemm600016.china.huawei.com (7.193.23.20) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yufeng Mo The firmware will not disable mac in flr process. Therefore, the driver needs to proactively disable mac during flr, which is the same as the function reset. Fixes: 35d93a30040c ("net: hns3: adjust the process of PF reset") Signed-off-by: Yufeng Mo Signed-off-by: Guangbin Huang --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c index aed97c934bfb..f1e46ba799f9 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c @@ -8127,11 +8127,12 @@ static void hclge_ae_stop(struct hnae3_handle *handle) hclge_clear_arfs_rules(hdev); spin_unlock_bh(&hdev->fd_rule_lock); - /* If it is not PF reset, the firmware will disable the MAC, + /* If it is not PF reset or FLR, the firmware will disable the MAC, * so it only need to stop phy here. */ if (test_bit(HCLGE_STATE_RST_HANDLING, &hdev->state) && - hdev->reset_type != HNAE3_FUNC_RESET) { + hdev->reset_type != HNAE3_FUNC_RESET && + hdev->reset_type != HNAE3_FLR_RESET) { hclge_mac_stop_phy(hdev); hclge_update_link_status(hdev); return; -- 2.33.0