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 5F12FC6FD1F for ; Wed, 22 Mar 2023 20:33:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231731AbjCVUdB (ORCPT ); Wed, 22 Mar 2023 16:33:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231693AbjCVUcs (ORCPT ); Wed, 22 Mar 2023 16:32: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 9F7497DFB1; Wed, 22 Mar 2023 13:23:53 -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=FJqzfMELp3aHXabyFcLYx72JXlBinAe4aH0QSo1TiCY=; b=qPJARAFsrEBJcdOL+b8XAAK0Y1 zgzx827W7EHC5/g91D9yTxbgW78sCRyfyl6ZZQJsIBdA8dsAkZT2QEndVkOtLxw7OI0DFWUbQBIKl r/fMA2vyanj/lPjGvQdL5e5FIQ7bVNTYGEZ8USCv+sOxDQEd0hcO0doXkd/pop79Rn/lPX8+p/54l J2xFFLyod3UwvBPcKuoulukpxXXI/d0x1jSQswr1aKgaIAmMyHRzLPSEyxhbUzU3x0PW4HC2alHc5 cO+O64saW+Ivt8Nq9L6ck6cW0sJ73aIcSJD3c3GEfMcEStGXXTdtHixz+vaJZneXiTNJwp5wSII6j 4vu7G6BA==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:42306) 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 1pf4lo-0003qQ-Ao; Wed, 22 Mar 2023 20:09:16 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1pf4lk-0000de-SY; Wed, 22 Mar 2023 20:09:12 +0000 Date: Wed, 22 Mar 2023 20:09:12 +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 5/7] net: dsa: avoid DT validation for drivers which provide default config Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Russell King (Oracle) Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Wed, Mar 22, 2023 at 07:51:22PM +0100, Andrew Lunn wrote: > On Wed, Mar 22, 2023 at 12:00:16PM +0000, Russell King (Oracle) wrote: > > When a DSA driver (e.g. mv88e6xxx) provides a default configuration, > > avoid validating the DT description as missing elements will be > > provided by the DSA driver. > > > > Signed-off-by: Russell King (Oracle) > > --- > > net/dsa/port.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/net/dsa/port.c b/net/dsa/port.c > > index c30e3a7d2145..23d9970c02d3 100644 > > --- a/net/dsa/port.c > > +++ b/net/dsa/port.c > > @@ -1951,6 +1951,9 @@ static void dsa_shared_port_validate_of(struct dsa_port *dp, > > *missing_phy_mode = false; > > *missing_link_description = false; > > > > + if (dp->ds->ops->port_get_fwnode) > > + return; > > I wounder if you should actually call it for the given port, and > ensure it does not return -EOPNOTSUPP, or -EINVAL, etc, because it is > not going to override that port? Then the DT values should be > validated? Won't that mean that we need to implement the method for all DSA drivers? -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!