Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp1255079imw; Tue, 5 Jul 2022 06:30:45 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sk8MZys8WrLrwfAyA51KrU7lU49+QBfQxTnOgfpuAtoJEcemMHm6D+UFztgXL1SjZx4N2h X-Received: by 2002:a17:902:cec4:b0:16a:1fc3:b6e6 with SMTP id d4-20020a170902cec400b0016a1fc3b6e6mr41603735plg.129.1657027844832; Tue, 05 Jul 2022 06:30:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657027844; cv=none; d=google.com; s=arc-20160816; b=L4tHR4xshiA4qqqcxRagjeQYt5yBXSvhO7e09eermuXxfgdimCby6sCOMQmQyoL+xX xUynbsQdKQ6D/Ct/z1tdM8u4HHTiTQy1JjSeG/McxIfwThTuwJbpQW1dAhg9PBfraM/y iNIS6kdCZzE2dt7bXu0x1mV5IadpmH6YPfpUH2Vstep7M0q3CRo+mzBbIbwoEDbk4syN JzNzGG9A5PxsysX77gP6RYvL5usCy8Vg0h2IebXIv4Mrj4lp2U3vwe2AK5ftU4vZz6wc nufczwJ0nBkn1o101+8TwyqLHTfAoOT5YJWlskZySTX9CM5ns4WsOOM0gkndR10lwWqz 6odQ== 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=MoYt1m0TZ5tjdpgAtn+ZvePKfZJYg7PV+jrrPcTaJaU=; b=PRt04VlZ8WEWDhTvJ7r4HGAUrSpcV0aZyHPsVDZXsBA8dS9HDnWAwKc1uEOuEKml4W USlPAcTnf+VcXemcaZCdSpAwvGALmWC4bU2Cc4bi0Up8bzDYqa+CsQBhu75miL0BMdDj yfiXNwWdrE+/3NbZpQ78lVsqn+/U9cn4nT8y6SHl66FwMTr8zRkkdl2icVi0H57Cd/oj PrETVPKW4X4wCsz+b9nsCTrskYi//ofyCZz5ZeGBJvx0a87qdLzvF6IS608mOWDN3EQs lmJwn/Wku586fvH1JFC+omzfT9H4CkBAbLQshcjzh17kSef25CMTEsTVc4rBDNHBnQJ7 gBzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="uSxaU/Qf"; 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 t13-20020a63f34d000000b003fbd727a15asi3938949pgj.670.2022.07.05.06.30.33; Tue, 05 Jul 2022 06:30:44 -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="uSxaU/Qf"; 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 S234031AbiGEMNb (ORCPT + 99 others); Tue, 5 Jul 2022 08:13:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234584AbiGEMHn (ORCPT ); Tue, 5 Jul 2022 08:07:43 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB2B3192B1; Tue, 5 Jul 2022 05:06:45 -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 3C15BB817CE; Tue, 5 Jul 2022 12:06:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A6F5FC341CD; Tue, 5 Jul 2022 12:06:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1657022803; bh=A3qOj5tL46J93KWO7+54TFWF3EI/YpjYTSY9CkP5LXs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uSxaU/QfHaZJRfSqplfMazNA37qkO1f8+p9OM6zCmccMkzCfvzN/skoDsS7G40lqA PyhimIuJHqk/w7wQUjUqzYNK8iIhqrI00uheJRU66Ceo6rsQ+o48zrcr76fTdZ7Ykk cy6SWyPii1XR2kkpFHnkyTvwYyo+DyIfq/rqQCjc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Doug Berger , Florian Fainelli , Jakub Kicinski Subject: [PATCH 5.10 16/84] net: dsa: bcm_sf2: force pause link settings Date: Tue, 5 Jul 2022 13:57:39 +0200 Message-Id: <20220705115615.800909329@linuxfoundation.org> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220705115615.323395630@linuxfoundation.org> References: <20220705115615.323395630@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.8 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: Doug Berger commit 7c97bc0128b2eecc703106112679a69d446d1a12 upstream. The pause settings reported by the PHY should also be applied to the GMII port status override otherwise the switch will not generate pause frames towards the link partner despite the advertisement saying otherwise. Fixes: 246d7f773c13 ("net: dsa: add Broadcom SF2 switch driver") Signed-off-by: Doug Berger Signed-off-by: Florian Fainelli Link: https://lore.kernel.org/r/20220623030204.1966851-1-f.fainelli@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- drivers/net/dsa/bcm_sf2.c | 5 +++++ 1 file changed, 5 insertions(+) --- a/drivers/net/dsa/bcm_sf2.c +++ b/drivers/net/dsa/bcm_sf2.c @@ -774,6 +774,11 @@ static void bcm_sf2_sw_mac_link_up(struc if (duplex == DUPLEX_FULL) reg |= DUPLX_MODE; + if (tx_pause) + reg |= TXFLOW_CNTL; + if (rx_pause) + reg |= RXFLOW_CNTL; + core_writel(priv, reg, offset); }