Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2351377pxb; Mon, 20 Sep 2021 19:47:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwf13nCsfe7Xg/1Cbri6Z7jkuvRp8CD1U+EjYC6RCazjzvu/bnMiREPIm46Znw5M2NJ4enI X-Received: by 2002:a17:907:2632:: with SMTP id aq18mr32711415ejc.211.1632192442860; Mon, 20 Sep 2021 19:47:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632192442; cv=none; d=google.com; s=arc-20160816; b=O/r2lz93Xk0j0877Nzr3jZ7WjLbiQWfM0Qit95MZk3B/bd8EqJxh4Px5J0JYBrK7Tg zkXS21b7lx1hdVI5vXL80e+3WFAx++uKH4IsPKAzxlxZOAPay9/WAXHIiU1OLRY7xJA3 DgPuapuR4GAyL/afKwBSxJZEs4aEGpsq53jahFM+O5ibo0WbLbnydkjcYgHkpfiYGh4A IdCAzKRE30WCNQXlaTW1JbkyuhRnAOsRZ5bnQVwqWAJOpcElxKsyyexkNR/saxuzWE4M YGfRZCx8eRJ5bvmbJQ4nUBRVPT5UARsaLhAH45w/nntttG5AITbkGTgGgZaoLPd9mstO kCQg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=BDgdtejdRAIenPnfLB/GUGUT9htgnhT8H66NNANzTCc=; b=ebnGROx9BKWoHY+ewuCBRWULHjkZ8WD4wuwrH+HcS8BSGeUmTk0szndOiEwo5NEbEW DSr7LQqDhDUtkqGhhRnDXmC9C7GaoCY5eThttVa/RIdfox76WnZmv1jGOjBRNShXDDcC bGvMeNpKQul8aPI7YcIyWgIDinUIlyGcfGEHzwLlFOKWStYNNw8TdSS3LSpZCsJ+lloG f3kZZPT6GEEVG3L7lKdqXyP0K1nhLAFwpTAxgrnlnFac1NYE8xywr1CgZx7785Xvbav8 7xvcDO0ivkh0VXZ79FzqaowiqG/cHk4Ks52ZF8KUxc6oWNvot1lXuwFpd/brLiWNyrf/ 59Sw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=eNq2rzpv; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u13si15677935eju.576.2021.09.20.19.46.58; Mon, 20 Sep 2021 19:47:22 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=eNq2rzpv; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379204AbhITS2c (ORCPT + 99 others); Mon, 20 Sep 2021 14:28:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:43192 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377708AbhITSW0 (ORCPT ); Mon, 20 Sep 2021 14:22:26 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id AF924632C2; Mon, 20 Sep 2021 17:24:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632158667; bh=01A7hg0luvvHutHgUdAsWYsGXGS2biR/gkZDFPQxexo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eNq2rzpvzFnJGm/PqEKh26mwwg6+AhPrxkTPmNFpLoTsoFCucYCL2qQG4ebpi5+zX gK5snh38MRDhyj7wjHZ/IOrHxHRej4peomL+CeNCEMINESKiEDDgNVJ5e+y5IqBAOg x+t2MHVdnxCS6Iid5zGdcRZWRH87gh97yMBI8NOI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yufeng Mo , Guangbin Huang , "David S. Miller" Subject: [PATCH 5.4 230/260] net: hns3: disable mac in flr process Date: Mon, 20 Sep 2021 18:44:08 +0200 Message-Id: <20210920163938.932240118@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210920163931.123590023@linuxfoundation.org> References: <20210920163931.123590023@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yufeng Mo commit b81d8948746520f989e86d66292ff72b5056114a upstream. 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 Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c @@ -6685,11 +6685,12 @@ static void hclge_ae_stop(struct hnae3_h hclge_clear_arfs_rules(handle); 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;