Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2353809pxb; Mon, 20 Sep 2021 19:52:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxX7gOSf39riF6Q6lRZJR6i7n436ltvRKDnB5Imi8EJAI2ZDK7q36eh1W5xnrNSv2f6sYIN X-Received: by 2002:a02:2302:: with SMTP id u2mr4544978jau.32.1632192757372; Mon, 20 Sep 2021 19:52:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632192757; cv=none; d=google.com; s=arc-20160816; b=jw58p112z1QXWulBocJrH0a5e+mb7LNLU4m4bLbXiYP2Cs9ahYIJsBmqacJUF/K1Jl bfRoD6yvBzRLc7WeHa2BHD7Y3NiuWZuuW8+GgzttcWfZFFOgniEH48lrErmm7kxVr+fL M6y376Ax6Y08vMI/gzab8cY25fc+DgvmvEVscBM63qRu6OvoRjmP3/j796HxMS/zOXX2 wSsD/4emeC33wEsixAw2Hso1DqD4GEwD9Qiadr5kS2/DwvtGnBbqXt7+iPlZDa0xgiNN 1MEA75jBZJTi9Gritrh5r0/Ukw9Rru/bX6RE/murdpinXj3fwaaWtqUpqQseQ2Hfpfd2 4WqA== 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=r/GQfUY8aRqaPoW+T8j57GKKyNNhntu7WxFm38MKzqo=; b=x1nzGfSNwkTNQf4uSEg2MgE4xhL+JMf7Pewp6DcrogHoh26OVOBZWq/IG8Ngz9dSuR crTzJNGMla0d1OiZH3Ct1xTMaS+lOtWV18u2fFURhsXWgtjr4Q8jOQqaqCI96PC5i9ZZ L4pqYaf1NZ/df3YalPTJhRvxbtL5jeZJFE7XmPEr/nDPR0k0kqSZ/cY/9ewcoaZtpdoV lnw5WRXyNXxZF6GaLkF9ClNq1EZpkybD8eLa8StZSaWCvLg6l8Ccq2PeH4kmS5xJlfXY xN0AWWyybS43kcolf5bhksGUMllMi7DXM1Vjxa+vKWUmqqnBxNDuq2V6StSjUguSSRPa /PGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=DF+qj7K7; 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 s9si14532888ilu.57.2021.09.20.19.52.26; Mon, 20 Sep 2021 19:52:37 -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=DF+qj7K7; 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 S1384258AbhITSr3 (ORCPT + 99 others); Mon, 20 Sep 2021 14:47:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:56448 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1382709AbhITSmR (ORCPT ); Mon, 20 Sep 2021 14:42:17 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 60F0F63343; Mon, 20 Sep 2021 17:31:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632159100; bh=CvchOUNTHdjar7sBjL9a72C3sS6vFes1cyYXWl3zJXs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DF+qj7K7HZF8/ZIukPtYF/GML99yxrH2sh4ro6C1H1ntOy3Pfh2X4UR2p57NqRQm7 b0qrlVdGuh+q7cQWiickrlNDn/RIPTg5svgsj5TGwHMLLhgZeJ+EuOdMVNPsGViJHT gtzwOqhhIUOKLiBjGfhG28Mns5C08Ev/RO9fSv10= 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.14 077/168] net: hns3: disable mac in flr process Date: Mon, 20 Sep 2021 18:43:35 +0200 Message-Id: <20210920163924.172756238@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210920163921.633181900@linuxfoundation.org> References: <20210920163921.633181900@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 @@ -8120,11 +8120,12 @@ static void hclge_ae_stop(struct hnae3_h 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;