Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp3399766pxb; Mon, 4 Apr 2022 15:47:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzMP9tQe+J8hy1XZZRHXD/k96gCdGkfgJUBX1Yy30E5AbXHp6kd1XwpEmMS7Y5BSCD7htF0 X-Received: by 2002:a17:903:2343:b0:156:9ef3:6ff3 with SMTP id c3-20020a170903234300b001569ef36ff3mr334976plh.62.1649112428598; Mon, 04 Apr 2022 15:47:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649112428; cv=none; d=google.com; s=arc-20160816; b=TNkmE4Ukkdum/NQXv9ll9jF+pBkO0Gdo1qhBjVTO02zc49lUER4Gph7038AzD8qLVs KENshWIJwfI9608kSi48BYZakg0bXYtb5mnmr6zl0Mb1erCNn2+Dp7xlsRFnMsfwkjCz 45w2KtWkevQcHhlZ/yRKT9fUFzU7EGqr9Hso3ViW5puKrCF1flyab8WlJyeaLcwKa/d4 5/JFfFU6AniaezLiHXEsqdshrMePSBx73g2emPWqGUKdK3eh5hucgneDRqM92DIrqL9E Smt8wys3Md8fVy2iV95JkRRHio3MUWlvgw/QVkOhyuFdWiJYlfl+hfj3s29RGzFhoPmI 6xKw== 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 :dkim-signature; bh=58YSpFA50xzEX0o1VZjQ7/+UQlBTUMwZtFQSDyO5Qo8=; b=BMrzeEySbOAarhS2xPpWXuCFXG3PHgyZvPpQiwxd4oHHQWyxpPbbchUUWqEMiY+o6j D212kVwzJG6ufqpNqHYatmJuF6AFI5VI/qDGRvfJu4GWgtjfjexTds/sJH5LHnHDJ7zI OyPupPGTZuTbk2BcNfyqVjKJDKQulg1hqWt1rnnylipidyUBFgbdNNei4jZzPtfXkSPr mbpGIlE2y6iOQXAjuj1xmTMjQ3j0SAfo27pAQcpbD/ZfkkUv+fzbZtEpix9thyCCs43R QzDGty/e1mbrsLVwC52WJ1j9U9KmxQ4hw92ioIzXpodbEWLxCn2wP3eZcH36eCAEtFhD 6l4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Nntf+mle; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e9-20020a170903240900b00153b2d1656csi11656944plo.372.2022.04.04.15.46.53; Mon, 04 Apr 2022 15:47:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Nntf+mle; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243171AbiDAOxn (ORCPT + 99 others); Fri, 1 Apr 2022 10:53:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348275AbiDAOdx (ORCPT ); Fri, 1 Apr 2022 10:33:53 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C17831EE8DB; Fri, 1 Apr 2022 07:31:37 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5EA0B61C1D; Fri, 1 Apr 2022 14:31:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9386BC34113; Fri, 1 Apr 2022 14:31:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648823496; bh=uM3lRLTtNLNjHSKFs2iV/4oI8nwpHuOztGJHsJnJs28=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Nntf+mleNGmL1UxZqkjYgHsTkqMmMReGADdTurUUm2SWBdcjnXkQBGXzi6miT5Irq 5aHjJnoclyraAR3hxdnbVFx4EFhthIXdlchBmr7R4oPfpSh4ylg5/yQHcPgpYVQDWN 2JV8mxJMKrzwNTq8L5wWOA0LmcGpj+DnzWRr1kAuXgsnTUflpIS1+sx4tOE67Hud5d M5ajvEt4CUrt6ugLtp+H5cJveQYY6blrNIWjKNNTuii9896s5DE1McBs2rePPTQlTC XZdXu+PPIhGAIukpUjSRbv4sonpSKtk/CbxjaJhLzUIkacEbEAJC287+3qaKpOz5az al3asqvXQo2LA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Michael Chan , Colin Winegarden , Pavan Chebbi , "David S . Miller" , Sasha Levin , kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org Subject: [PATCH AUTOSEL 5.17 119/149] bnxt_en: Eliminate unintended link toggle during FW reset Date: Fri, 1 Apr 2022 10:25:06 -0400 Message-Id: <20220401142536.1948161-119-sashal@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220401142536.1948161-1-sashal@kernel.org> References: <20220401142536.1948161-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Michael Chan [ Upstream commit 7c492a2530c1f05441da541307c2534230dfd59b ] If the flow control settings have been changed, a subsequent FW reset may cause the ethernet link to toggle unnecessarily. This link toggle will increase the down time by a few seconds. The problem is caused by bnxt_update_phy_setting() detecting a false mismatch in the flow control settings between the stored software settings and the current FW settings after the FW reset. This mismatch is caused by the AUTONEG bit added to link_info->req_flow_ctrl in an inconsistent way in bnxt_set_pauseparam() in autoneg mode. The AUTONEG bit should not be added to link_info->req_flow_ctrl. Reviewed-by: Colin Winegarden Reviewed-by: Pavan Chebbi Signed-off-by: Michael Chan Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c index 8aaa2335f848..f09b04556c32 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c @@ -2101,9 +2101,7 @@ static int bnxt_set_pauseparam(struct net_device *dev, } link_info->autoneg |= BNXT_AUTONEG_FLOW_CTRL; - if (bp->hwrm_spec_code >= 0x10201) - link_info->req_flow_ctrl = - PORT_PHY_CFG_REQ_AUTO_PAUSE_AUTONEG_PAUSE; + link_info->req_flow_ctrl = 0; } else { /* when transition from auto pause to force pause, * force a link change -- 2.34.1