Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp1247391imw; Tue, 5 Jul 2022 06:23:14 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sx4GPKQD0GfXfBxgmGzOCC9Wlgvx5/AEzFDw2bNjAp27Hybv8io3l4WUhP5/Dkm25VcW3O X-Received: by 2002:a17:907:1741:b0:726:b8e8:7dc1 with SMTP id lf1-20020a170907174100b00726b8e87dc1mr35264097ejc.0.1657027394510; Tue, 05 Jul 2022 06:23:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657027394; cv=none; d=google.com; s=arc-20160816; b=JQ86jmZ0qgEzTmj3PARNLq3IRrtC7L1okS8KuCVFBa4HrdnpamJ3OOprmcJpOhVZdt YOd0ZmMyqlYejWk2Af1boOK+wmJrhz6j/wg3FES/5aTs4q8bY3GKP1WsBxzlCfK/5cL1 8OLPy5oyrXWwFZcX0n2UyHi+1xnmJeueAybfWgb64ixHzn0IBq1zUFpSS7sv51oxULBy sDWrubkcTrTHLmwY4mEAezchkCR9/0fA9Vqxo4RVS6HKmPFZ5RNnx0jKhOR9hw8ZMV+M buy4qPxvKdo3ZsleV0nMo2OMmSC6B7Jwx6GF3O6m7fRQ8gOuhySF60AXNk05sLguuMUE V3dA== 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=YuyPVASfoVDPg8hT8UOBnjl9NNzTHDQKBQ1NGOretjg=; b=MJN+9McLSfuLosvQWxgAWgjDPrpD2/FbWY80wg51NcDl1bOcdfEK7IkQSTykzFUpX/ 6KmPNiYZBY+tkuMXhu9lr1XwvMKOKSPYl2+ZIiKQHlyF3TtUoBFZNypHPbiMUMee21NX mMt6W1yhpd0PdrzItCsvePPs6JYrLdIssNe3g+j2gc9SrEqwelTkhZK+ogZ78GpVIKF0 BUNUqdRoViDRk/LHmAqMnrGtTmUey7odIt5zplhG5TVvYjKI9NVd/Bx68cawvvvXibxk tn5ywTSrg3sdn1zagbQ2MMmb4mVaU5MwzW3AhOC41m1laYZAnyDORLHUCPNcpZFLtsMv xUJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=AaMWpRZg; 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 i5-20020a170906a28500b0070ed13d358fsi39094038ejz.194.2022.07.05.06.22.49; Tue, 05 Jul 2022 06:23:14 -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=AaMWpRZg; 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 S233958AbiGEMFa (ORCPT + 99 others); Tue, 5 Jul 2022 08:05:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46026 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233403AbiGEMDO (ORCPT ); Tue, 5 Jul 2022 08:03:14 -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 2FD7418374; Tue, 5 Jul 2022 05:03:13 -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 BC283B817D4; Tue, 5 Jul 2022 12:03:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2750AC385A2; Tue, 5 Jul 2022 12:03:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1657022590; bh=QbrYS/RU5R8iMp2wKanbvTD0Py0IUdqsvNxuUk9AJB4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AaMWpRZglWL5Zs1L2KiPI4ui63yVr52qlLRMoWHTlIo7qFqesJ4YJ5iwoyVuKvRiK 3uaX52BvbusZtlgdB9miaMJqt+nc9M58Xpt8QaY6RB/x3YQUK1vqJmQq8rih58vl9Z XXQhAOKBypOpUAhQht1oMz++cu/fpP4t0FNmFsHc= 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.19 24/33] net: dsa: bcm_sf2: force pause link settings Date: Tue, 5 Jul 2022 13:58:16 +0200 Message-Id: <20220705115607.421454267@linuxfoundation.org> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220705115606.709817198@linuxfoundation.org> References: <20220705115606.709817198@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 @@ -599,6 +599,11 @@ force_link: reg |= LINK_STS; if (state->duplex == DUPLEX_FULL) reg |= DUPLX_MODE; + if (state->pause & MLO_PAUSE_TXRX_MASK) { + if (state->pause & MLO_PAUSE_TX) + reg |= TXFLOW_CNTL; + reg |= RXFLOW_CNTL; + } core_writel(priv, reg, offset); }