Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp1247982imw; Tue, 5 Jul 2022 06:23:48 -0700 (PDT) X-Google-Smtp-Source: AGRyM1ub/7D/+l2IrrT5qI+m89xX/daXUsf81k2i5TQlnmmVpW/pIEgG0kBGbnOX45Kg+RFMdjuD X-Received: by 2002:a63:501c:0:b0:412:6080:1c66 with SMTP id e28-20020a63501c000000b0041260801c66mr5905856pgb.558.1657027428323; Tue, 05 Jul 2022 06:23:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657027428; cv=none; d=google.com; s=arc-20160816; b=BipMDgen8fkLDHzDUV9C0e8fKw0LfCV/ZhlW4JenBSabBQ+zRaynx3DaWxp6tbQydw cDBO2JzW3g7xFHqoOWXuIATwLsqagUsw1fpp2SOooZeEE9Lo7vp2Z8CwUCPhEqnoldkR l33fZ/LTs3BcA9tZ/4+0z/vL+HitKIabEYm9lEW+CxVK+5WlqcgdIAjcGhYJR31MFxBB w5+2K+3A9cX1WftVBduokMtvG3/zzJ5fH/O7tjIU+pahap4IHhGPl4LowDcMCj+ettpt Dm2sDdLZfcPLbweNv0UqRcacHwTt2Kfw4/CvdCXuiG2XTDdk0pDZLdtVlv/FB1hnSJLc woxA== 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=fmTK2ff9aFTjTLleAqZxPNGb/YgiCfI9URVc6J8jkQY=; b=SSrP74llHIjR4xt2QQ76L3h9k8pbhPcrIOwOESBjEVZQ0rMt9TS4vCkB6615pd9rHe rFyJiMgByvpBg5uXsNgS5kpS4Liifl/NZkJuW+XiRg35/qFn7gC/9f/y3D9gIPF3dtqx zPBuyxyVE5ulWzMRJmV9lJtD67qrXQoYwz0pIYVo4ATvWep1M9K3+Tr4cx0ogHzWPbu4 gvuZQ5J5qNeV2RhaCy1UyGvQbBU8dcS80d/fFgLlwRtjLfAfXQHKD9GMS2kHaPcgHA0R vqWNk2a1a7V/fnvnjrxFKiCWHoSFTtp8Vl/X+f8fBgoqWxNGsOg5lt4SvvklNF0MQpGW o+7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ZEbbIgjI; 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 x190-20020a6386c7000000b0040dbc218651si18514007pgd.173.2022.07.05.06.23.36; Tue, 05 Jul 2022 06:23:48 -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=ZEbbIgjI; 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 S232660AbiGEL7z (ORCPT + 99 others); Tue, 5 Jul 2022 07:59:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41848 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232619AbiGEL7p (ORCPT ); Tue, 5 Jul 2022 07:59:45 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A019F17AAA; Tue, 5 Jul 2022 04:59:42 -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 3FDF161791; Tue, 5 Jul 2022 11:59:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 49361C341C7; Tue, 5 Jul 2022 11:59:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1657022381; bh=8S7fmxJW1z0SoBquh6YRBSffHhlVz4I2j/kKs9IFuXQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZEbbIgjIVoaTa/7r3K3NWN70JbVXN9OP6S0CWaS/KbVupfIcbsVQz0P7+QyYh5Dzy oLniTOLr/T29RskJDY9enUlXyAwxaX2aQ47InPec72Kwmh2zwp2CNT/Cji90TJBMFx mxcasKW8G7S+U/oMN6OKywVqY5MwT31fDv9CQODE= 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 4.9 16/29] net: dsa: bcm_sf2: force pause link settings Date: Tue, 5 Jul 2022 13:57:57 +0200 Message-Id: <20220705115606.227964792@linuxfoundation.org> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220705115605.742248854@linuxfoundation.org> References: <20220705115605.742248854@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 @@ -671,6 +671,11 @@ force_link: reg |= LINK_STS; if (phydev->duplex == DUPLEX_FULL) reg |= DUPLX_MODE; + if (phydev->pause) { + if (phydev->asym_pause) + reg |= TXFLOW_CNTL; + reg |= RXFLOW_CNTL; + } core_writel(priv, reg, CORE_STS_OVERRIDE_GMIIP_PORT(port));