Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp3869622pxb; Tue, 19 Apr 2022 11:26:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx7tJ1VVwzLcDvQxu2ibhJILakil+Rfgqc6p581lQ7rpL726EcHqBXozfxQK4fRpd5KozG6 X-Received: by 2002:a17:903:248:b0:155:ecb7:dfaf with SMTP id j8-20020a170903024800b00155ecb7dfafmr16770106plh.84.1650392782203; Tue, 19 Apr 2022 11:26:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650392782; cv=none; d=google.com; s=arc-20160816; b=UiM0fNKuhDcAoaiYearAmmnU67SonPPMz/iaqtKYzklahWU+Y/tHs/tYogHucNlS9b b7ufx0TFYETkSSEukbk2JPp+GsqVqCU7Wrjdyt5Y+zfWHqJUJNgJzRI7F2V8B/OTacoZ yRGkkMHshQZRHlirFAfHDBQ+oAnuvdiHuTFOd8uJL36+zPY64XQ5U4iii6EtRp8nNYFq 5Mnhfc2r7JNW3+zU4Pyv2AlIvsq/nQO1CHPpL4iYjPydgVVB3JilJatZuCd78xITkS3W dUKIvX0ElTPPd8MP1pzXXW6OG+vbZ+Duj2+jqRN/jJopztSF4a4FMXm11L8wtD0U4xgq jIfw== 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=Lw7tMndRDv80Ot7a8SNDOF93HzwkglodFpFrAzG86gI=; b=oM3bzkxv5mo53M0liKt94kut0CvF2hzPbJKl3AD8vj/9ZtBnRBL2lHL0XzY8XCu6Jh 5wRS8BZytdlFcKeoiuv4nQ01xfVcqZurt0pbS8iM6TciT+DBhpKafAIFPlv72XkABi5P WihuzmH61lNb5yxv6O2jlpmobErbrN9AIKsMCK8F2MXjjw2GEeoSJRnFU/b8JZlrD7FW xv26vwGvitOx4byXP8ooQjEHeQOQTdK8pgSLR3/Hqpli5DZbN8m1d69CVkb9RhvGrt6m eUsa6fZPTjnWOh2QHgDAEoi8acNYdJfojqkheWgFjsm5XZl+DmxYuj/5YHJugJNmM7Jo EDIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=XKJRMFzn; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o16-20020a17090ad25000b001cb852fbf40si2616413pjw.55.2022.04.19.11.26.05; Tue, 19 Apr 2022 11:26:22 -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=@linuxfoundation.org header.s=korg header.b=XKJRMFzn; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245007AbiDROAZ (ORCPT + 99 others); Mon, 18 Apr 2022 10:00:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244054AbiDRNiy (ORCPT ); Mon, 18 Apr 2022 09:38:54 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E48727B3C; Mon, 18 Apr 2022 05:58:31 -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 ams.source.kernel.org (Postfix) with ESMTPS id 807A9B80E4B; Mon, 18 Apr 2022 12:58:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BB8F9C385A8; Mon, 18 Apr 2022 12:58:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1650286709; bh=u3oljpL6Q3BI7yOHYh2I9e9zUcg05CmiAXsiNFDCGks=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XKJRMFznD+ThYvXId8hbZs/bbuXq8OW4FxTBeI67lP9B1SRpGz2GQO32WpA5HLora uxgc0m6Z/NyYE18/0mclDesR8XVqufcXtsw343VzUPWNVgbr+x3DYxOzXdVd+gZab/ aEmEtnS5auu3FLiiaDFyOWEPD2qSBrHflajm3Lpw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Colin Winegarden , Pavan Chebbi , Michael Chan , "David S. Miller" , Sasha Levin Subject: [PATCH 4.14 221/284] bnxt_en: Eliminate unintended link toggle during FW reset Date: Mon, 18 Apr 2022 14:13:22 +0200 Message-Id: <20220418121217.996780401@linuxfoundation.org> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220418121210.689577360@linuxfoundation.org> References: <20220418121210.689577360@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 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 e3123cb0fb70..82e16b2d1f7a 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c @@ -1272,9 +1272,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.35.1