From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BA1BBC76196 for ; Thu, 23 Mar 2023 18:25:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229691AbjCWSZr (ORCPT ); Thu, 23 Mar 2023 14:25:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229489AbjCWSZp (ORCPT ); Thu, 23 Mar 2023 14:25:45 -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 A17E1212B8; Thu, 23 Mar 2023 11:25:44 -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=wsJuB1mGkf26mbLdBUS/cSW1mH+r9hLTNZ2z3JvPoEc=; b=CP54IJuZeYCkONyPf8ZkSxVcgs mwVDrHGdsGXUzywTL1QO8ouL5KPl4OR9CBExXkJLXz7LRbVQ4pVjI0gfkt5Eq409yC7Ylq22V8plX SUzmaVqAaTekx8qFYtkFQmdQol4b2Vyh23sME7LEJDqmRyaidJDewDcJli2nAF4axbhiFwsGaGDzr vrk8lKm7z7Dqe0kct79AZU0XCvuGml+PUMul6nNGEg0XakpP4+s6S1SDCw4CCncpzqLbQtgQO4Hji OitU5BwNUEQL9d+Mz4/e1AV7mjcC6sRE3rHSNSqYUsgY7m4FNf79Qmfs3VYdzf9DtACYJiRyVl3+a MXwrax7Q==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:45254) 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 1pfPcw-0005dW-FL; Thu, 23 Mar 2023 18:25:30 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1pfPct-0001bd-TB; Thu, 23 Mar 2023 18:25:27 +0000 Date: Thu, 23 Mar 2023 18:25:27 +0000 From: "Russell King (Oracle)" To: Andrew Lunn Cc: Heiner Kallweit , Andy Shevchenko , Daniel Scally , "David S. Miller" , Eric Dumazet , Florian Fainelli , Greg Kroah-Hartman , Heikki Krogerus , Jakub Kicinski , linux-acpi@vger.kernel.org, netdev@vger.kernel.org, Paolo Abeni , "Rafael J. Wysocki" , Sakari Ailus , Vladimir Oltean Subject: Re: [PATCH RFC net-next 6/7] net: dsa: mv88e6xxx: provide software node for default settings Message-ID: References: <04869523-3711-41a6-81ba-ddf2b12fd22e@lunn.ch> <5922c650-0ef3-4e60-84e6-0bfe535e5a98@lunn.ch> <8133635f-8d19-4899-83e2-0bf9b7b644b2@lunn.ch> <4ae939e1-8d11-4308-ace3-7e862f0bd24a@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4ae939e1-8d11-4308-ace3-7e862f0bd24a@lunn.ch> Sender: Russell King (Oracle) Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Thu, Mar 23, 2023 at 07:17:27PM +0100, Andrew Lunn wrote: > > So, given that this is only supposed to be used for mv88e6xxx because > > of it's legacy, maybe the check in dsa_port_phylink_create() should > > be: > > > > fwnode = of_fwnode_handle(dp->dn); > > if (fwnode && ds->ops->port_get_fwnode) { > > > > In other words, we only allow the replacement of the firmware > > description if one already existed. > > That sounds reasonable. > > > Alternatively, we could use: > > > > if (!dsa_port_is_user(dp) && ds->ops->port_get_fwnode) { > > > > since mv88e6xxx today only does this "max speed" thing for CPU and > > DSA ports, and thus we only need to replace the firmware description > > for these ports - and we can document that port_get_fwnode is only > > for CPU and DSA ports. > > Also reasonable. > > The first seems better for the Non-DT, where as the second makes it > clear it is supposed to be for CPU and DSA ports only. > > Is it over the top to combine them? To be clear, you're suggesting: if (!dsa_port_is_user(dp) && fwnode && ds->ops->port_get_fwnode) { ? If so, yes - you know better than I how these bits are supposed to work. Thanks. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!