Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp887986imw; Thu, 14 Jul 2022 12:49:05 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sr/vB8AD2VisBAss44+qgNWrUFVp1f+vFKrDSbpFRoJCaR0WpZEJ05TI1G7Bt8dHHE0j1B X-Received: by 2002:a17:906:d550:b0:726:2b34:2fd6 with SMTP id cr16-20020a170906d55000b007262b342fd6mr10234572ejc.311.1657828145390; Thu, 14 Jul 2022 12:49:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657828145; cv=none; d=google.com; s=arc-20160816; b=T6S7blaFyMZuiSpJ/MTlc3i6p5dUIRQRGdA/TBQCsT1+f96MweLcU9MhHtiffOXy+q fK8gywBeTo8JgTmCigD2i2RKKfz/k6g7fMXW25u00AqhG01VEKOxLt+yLQWQC+HDWzg5 Oc4eFHbA4vUk9xPK64cX1tMaaFK2ukyiINV7gOmG9NRUhBkzivcW2ga5V2h/Qau7qRqS ptGqm+lpblPCeT9dNsYpt9yK96IaYtrfqON+PQ0v9ePp2VnB1Fb8WlVKTuj3NIrvMmGk emT47Ov/SGBlu2PUlTX1V7NE6CA0phzSWTorTY2AJIkDyMOEw/eFHAwxEE8VFS6LgbPA RWPg== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=juqdfawgY+mSOy4Q9xQHkJDUGz0LPzuu1htfB/1lskw=; b=Cm33/e525aiUYYiLsW+P0O1F2jbiP5DfRUDmgisd3CNdnpefa3SiH04vGK4Gn5u3Lm VOz/Ek0zi9+fOM8l0mNOSW1FViKPcPTpHOQzSa7FKjXPc8C0Wh04GJef74MVIf7zVgs0 cVJllhZ/DZtK5lw1kdVXn2N2eJZZ0I3l4Ot/c/55OyvdwWRMGLoWYdkwAWh5/XWdqETG +8C1lH9m3aIv6km0d1pmvKyZS7C9dBJHKNPF2qh7CAqWvaGuYAbPEWS3Pih2ABoBOvGT qfzvscgUybZHUQUykpAVD6DWXXV1Ymo5j70cAjiFQn8OQZe2fsb8N1Qqt5+j/D26tCI2 OGcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=nefOM4zV; 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 ku10-20020a170907788a00b007111f8df172si2946656ejc.271.2022.07.14.12.48.13; Thu, 14 Jul 2022 12:49:05 -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=nefOM4zV; 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 S240694AbiGNTou (ORCPT + 99 others); Thu, 14 Jul 2022 15:44:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232580AbiGNTos (ORCPT ); Thu, 14 Jul 2022 15:44:48 -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 E88066BC27; Thu, 14 Jul 2022 12:44:45 -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-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To: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=juqdfawgY+mSOy4Q9xQHkJDUGz0LPzuu1htfB/1lskw=; b=nefOM4zVvJVlye2X2eOBPrTjOF M+tA7bm/BSfK8k3HugWHtepejg31y/x7X3Xv4igOK1f23iFTQb71LqJuZQ5pkAxiKlJCjP8dGOvEe yIrHeKA/ub+CP1rWS6VdjyPtFsi1GSDfCPb+un1VdGovhK59h0pKNQXagJQCv0dittjgzXB7A0EPF S/gyOybpAiHfo+a7IAwHL2O01YoDV/Z0Rs+HnsNjaVf+FxXaXJH4AagMpd2qA2R32Jw8cXVurCseK cZjBuDLr2ONA2lFMmxV7AZfxr7aiQ6DgDSGbr7QU30CibtI3jDhDigKR9DW2APaL+tPJGx7DSEIBs N7Hn3m3g==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:33344) 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 1oC4lN-0006G0-ED; Thu, 14 Jul 2022 20:44:41 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1oC4lK-0006qv-Ou; Thu, 14 Jul 2022 20:44:38 +0100 Date: Thu, 14 Jul 2022 20:44:38 +0100 From: "Russell King (Oracle)" To: Marcin Wojtas Cc: Linux Kernel Mailing List , netdev , Andrew Lunn , Vivien Didelot , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Grzegorz Jaszczyk , Tomasz Nowicki 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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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 07:18:57PM +0200, Marcin Wojtas wrote: > Hi Russell, > > czw., 14 lip 2022 o 14:32 Russell King (Oracle) > napisaƂ(a): > > > > 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. > > Thank for the heads-up. Are you planning to resend the series or > willing to get it merged as-is? I have perhaps one comment, but I can > apply it later as a part of fwnode_/device_ migration. > > > > > Marcin - please can you test with my RFC series, which can be found at: > > > > https://lore.kernel.org/all/Ys7RdzGgHbYiPyB1@shell.armlinux.org.uk/ > > > > The thing is my v2 of DSA fwnode_/device_ migration is tested and > ready to send. There will be conflicts (rather easy) with your > patchset - I volunteer to resolve it this way or another, depending on > what lands first. I have 2 platforms to test it with + also ACPI case > locally. > > I'd like to make things as smooth as possible and make it before the > upcoming merge window - please share your thoughts on this. I've also been trying to get the mv88e6xxx PCS conversion in, but it's been held up because there's a fundamental problem in DSA that this series is addressing. This series is addressing a faux pas on my part, where I had forgotten that phylink doesn't get used in DSA unless firmware specifies a fixed-link (or a PHY) - in other words when the firmware lacks a description of the link. So, what do we do... -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!