Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp508665imw; Thu, 14 Jul 2022 05:45:54 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tJXmnciLHemd3Eg0DzkWeuIHeiBBuomsse0JgarHbbNHAWYOxzH9f3qCIBeLg/GtEEhF4I X-Received: by 2002:a05:6402:1e95:b0:437:ce7f:e17a with SMTP id f21-20020a0564021e9500b00437ce7fe17amr11925194edf.169.1657802753949; Thu, 14 Jul 2022 05:45:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657802753; cv=none; d=google.com; s=arc-20160816; b=ceIoSloVJ/PohaGZLclkQydinSJoyPRMVGMZfI8sWAtOI1e67pWv27R69rqGMDDRD5 5Bm/r6452FUVGw/rnfHoaiI4n4EkI39VGCU6vtmle9dboSiMPXEKuALLfj2eZOGNoFqm igz09Nwes94x+1eM/DjH/VOgHa3+BGv5Fhu4JU6ZmMa1MjvDUoKXX1oeqYtV9GvYY9OE QsS7DphEE8MioF23CNmcCuroH+3I4AN7W73QoMGl5qc9ECgrjfEcQ8k3GS8+/XxuQsiV 8f8zgHDff3598ya6k6uamGHH2Vt+0yXFeifJ9eYyQYSqoUsujRSXJHkD5advVnRCzGBZ ztAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=CSm2gLf4QcOqQlzgrJqL/4ORE9QT/t9M29vo0z4hgk4=; b=UkQI8Wgl+cPZEMpMQ4N087JTsJzuHqmWNxUTUgsE6d86ziHulaZKs3fMcfx9w1JwJ+ 4B9ihQji3nmuIykYv8+kF2A9AzMwz9PPubqodAwtcFIWKNt9lX+7WuVaTMF5cPWFcVw/ ggLQMcY/jeIsAR4vUwzQ4lGRDz8sTbVX8UsOTlpBEu9+L2Q2DbpSvdRDGiA85/QrzqUC zK63r7i2j5g+MMCPlqz6QCoH4UMsoABWGnBhINy9hr05bhsKuLjAtFPw9rDdvbyhj3O+ FS09dEllb6zyDyAxRVBGuR0xku1+C46zeowD6Z27zQwePZW3bx3o8NrcywaVlLXvUKmz dQJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=0GXELlLU; 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=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m3-20020a056402050300b0043a6064cee3si1796566edv.69.2022.07.14.05.45.28; Thu, 14 Jul 2022 05:45:53 -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=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=0GXELlLU; 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=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239027AbiGNMcX (ORCPT + 99 others); Thu, 14 Jul 2022 08:32:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239105AbiGNMcM (ORCPT ); Thu, 14 Jul 2022 08:32:12 -0400 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0056E3CBCE; Thu, 14 Jul 2022 05:32:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=CSm2gLf4QcOqQlzgrJqL/4ORE9QT/t9M29vo0z4hgk4=; b=0GXELlLUnCCO9kXFpy1+MwJ7J0 Dz6QP7w4ncBpRiGBEJlBDtAWU9aywNwObKeofzSfJjk+JYzzoPslYhCYSnBaKvKpJf6ucwaW+G1fC Ml9uY6ENoO5yfYlnKdCDsQymYrAYOCOZDvncWSZ+cR5ffla44Y8umY0nfqi2SWUZ/f2y/DbI6QepN 02N2yZwy2S3ts1dBMX8m5zEHf3K1aBWZuJicB/QNvSDwaB69KXivWNldnJH5/cr6csCYPZjwj9M3u H49T9Yv2+GFVWcIRxARh7Mp1sXSU2eyh/d1tLMsCGc/wwt53trDIgi+Y1GQsJ5bY1a6yqkD57NJhl zUDwgPUg==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:33334) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1oBy0k-0005li-H5; Thu, 14 Jul 2022 13:32:06 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1oBy0h-0006bb-VK; Thu, 14 Jul 2022 13:32:03 +0100 Date: Thu, 14 Jul 2022 13:32:03 +0100 From: "Russell King (Oracle)" To: Marcin Wojtas Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, andrew@lunn.ch, vivien.didelot@gmail.com, f.fainelli@gmail.com, olteanv@gmail.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, jaz@semihalf.com, tn@semihalf.com Subject: Re: [net-next: PATCH] net: dsa: mv88e6xxx: fix speed setting for CPU/DSA ports Message-ID: References: <20220714010021.1786616-1-mw@semihalf.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220714010021.1786616-1-mw@semihalf.com> Sender: Russell King (Oracle) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE, 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 On Thu, Jul 14, 2022 at 03:00:21AM +0200, Marcin Wojtas wrote: > Commit 3c783b83bd0f ("net: dsa: mv88e6xxx: get rid of SPEED_MAX setting") > stopped relying on SPEED_MAX constant and hardcoded speed settings > for the switch ports and rely on phylink configuration. > > It turned out, however, that when the relevant code is called, > the mac_capabilites of CPU/DSA port remain unset. > mv88e6xxx_setup_port() is called via mv88e6xxx_setup() in > dsa_tree_setup_switches(), which precedes setting the caps in > phylink_get_caps down in the chain of dsa_tree_setup_ports(). > > As a result the mac_capabilites are 0 and the default speed for CPU/DSA > port is 10M at the start. To fix that execute phylink_get_caps() callback > which fills port's mac_capabilities before they are processed. > > Fixes: 3c783b83bd0f ("net: dsa: mv88e6xxx: get rid of SPEED_MAX setting") > Signed-off-by: Marcin Wojtas Please don't merge this - the plan is to submit the RFC series I sent on Wednesday which deletes this code, and I'd rather not re-spin the series and go through the testing again because someone else changed the code. Marcin - please can you test with my RFC series, which can be found at: https://lore.kernel.org/all/Ys7RdzGgHbYiPyB1@shell.armlinux.org.uk/ Thanks. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!