Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp541809rdb; Thu, 1 Feb 2024 17:03:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IEqEvVibllcv1QnSLkIIl6XJJSx7rldkBrNo6VjWlp3w1Hw1U8CMzOaySMDsBBvbtwqBLW+ X-Received: by 2002:a05:6358:78f:b0:178:678d:bb0b with SMTP id n15-20020a056358078f00b00178678dbb0bmr6485776rwj.18.1706835798786; Thu, 01 Feb 2024 17:03:18 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706835798; cv=pass; d=google.com; s=arc-20160816; b=ijl1wbh+qOvGOMWTObE4bDjCk/SSUbQ3ZE7wEUtw8xPXqtTGZVvMYhH7RLOHvXrqV4 ES+MfqwwCZJzyC9zQbKKy9xbAo9/JJUx+BA0sLdV/0tCq1pVBl49QtmJIB/ESGRbi/fP c4wGgiKk8rktP6vuozT9IWKRXMOWQ5MUqwr5TivgW0E46mnoAI2AozEC7Dt1OZtoytTw yGmMbeDTa5F98fTdT/6QMdrquzYV59zAYWGhXbgww66vm1wMUFs975MisTJ28XJmYZ/o Z3gdO4ltXCqENBgD0tbfe4mwCIbOdWoHOFbedg0gUB5+yDpoIpTygsAyUfBJCGqK5uLf /fOQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=SRwLFjr2kgHxYJ1y6JChlTLnAQdKVct1/aWOL5U9V1E=; fh=biQegbnW52l01ZjV3fzCZbkU7Kj3FhJyCnAWT/uOR7A=; b=euIPaut3zVGKGcJ37TyjZyZczoG/bjLLW7Wmq/U9E4m9fp3FSnPBj7wUGv5wh9Yt2P 7qoAQm7F52BQ8uWqGZ/Iz9xrOe9t/X8UHbxVWg84W2NvFkNMIndModB81Hu5JJcaONv5 /n8pykBffMPc+ddBDHOvi/Yikd6BJS2hk53CLrTBQocY9/xzL6PDmMbkx0IcRzpi+4J6 Zx27068y8Kcl0CWBOg9MmGxwqoc6n/AqDugqS9I9PUSjdfjWg0BVvKKIWwhXfVqEOah2 hkJdj4Nf/iGkwrbQm63tDN19aiI3CPAahAuQojBO+eK5qSBq/mMWUfS5/Af7nWSjs+pR yUaQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=dGjiB7bY; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-49042-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49042-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch X-Forwarded-Encrypted: i=1; AJvYcCUFGAWz/Ku5e77XOnaFnPpA0hV49LPQXwUoQDmAqJilUdZgNDK3xNhRcvVhOb9iBHh01nDaAhUop1YqNjXz13JATKLaOEtNjyCKN9rxdA== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id b21-20020a056a000a9500b006dbce4a7c80si557445pfl.397.2024.02.01.17.03.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 17:03:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-49042-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=dGjiB7bY; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-49042-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49042-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id DF14FB2180D for ; Fri, 2 Feb 2024 01:03:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E830B6AA6; Fri, 2 Feb 2024 01:02:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="dGjiB7bY" Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6397EAD4F; Fri, 2 Feb 2024 01:02:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706835775; cv=none; b=JVO2MNZxPPiXCDSAJzdN3CQQwP81sI1mBwsT6BJe/uvnypom6zZuxWYdDF78VD6T3skHu8oAr0wumz7H+/IKXxXbTdGOOstwuwIOenu9VSgIsgY1Zyxv+OvsHMUsZ+ScnBgOQUz6A/9kZ1Tf6tBAsnZWHOjf/p96Ihkq7VnhyZs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706835775; c=relaxed/simple; bh=t7fqNukb58DPR2uH9r6sePm8zu2FpuOah650ZPEwo7c=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=a6AOXqrfYgTt/L4T4xlopJ9sJVNdaTGHo2hb6IpdoF6cFuGRp+C2n8bAf+mXkzj5G1jm2yhvysWCC1FJuCpfxDU4c+PVzLuxCYvl5l8I/Nir1Z780DXqlh8tEwWJXHnf6z96gez0b9j5HaKjo/56N5DGCZL+Yf5CuXViVQPzxXk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=dGjiB7bY; arc=none smtp.client-ip=156.67.10.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=SRwLFjr2kgHxYJ1y6JChlTLnAQdKVct1/aWOL5U9V1E=; b=dGjiB7bYGz73GOemZdRIpMdldZ fjwWY0MERslapOKspJ8e7S3E+cKy0xPZ8YR5/KAbl+E3TlvK80b9Oy5wiGXajZDDh7tY6U8mnzJGO QtpI7PeFasregV25OhbVn5v29t2nA8HqVbCHXusiGm201hkk/yRBTAzs6Pw170EHBSmE=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1rVhx3-006jdz-Ce; Fri, 02 Feb 2024 02:02:41 +0100 Date: Fri, 2 Feb 2024 02:02:41 +0100 From: Andrew Lunn To: Christian Marangi Cc: Antoine Tenart , Bjorn Andersson , Conor Dooley , "David S. Miller" , Eric Dumazet , Frank Rowand , Heiner Kallweit , Jakub Kicinski , Konrad Dybcio , Krzysztof Kozlowski , Paolo Abeni , Rob Herring , Robert Marko , Russell King , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [net-next PATCH v5 2/9] net: phy: add support for scanning PHY in PHY packages nodes Message-ID: <2bba44dc-b5df-46ef-b5f3-eabbd34aa7db@lunn.ch> References: <20240201151747.7524-1-ansuelsmth@gmail.com> <20240201151747.7524-3-ansuelsmth@gmail.com> <170680473689.4979.1991415008659281513@kwain> <65bbd2ce.050a0220.5ff09.69d5@mx.google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <65bbd2ce.050a0220.5ff09.69d5@mx.google.com> On Thu, Feb 01, 2024 at 06:20:10PM +0100, Christian Marangi wrote: > On Thu, Feb 01, 2024 at 05:25:36PM +0100, Antoine Tenart wrote: > > Quoting Christian Marangi (2024-02-01 16:17:28) > > > > > > +static int __of_mdiobus_parse_phys(struct mii_bus *mdio, struct device_node *np, > > > + int base_addr, bool *scanphys) > > > +{ > > > + struct device_node *child; > > > + int addr, rc = 0; > > > + > > > + /* Loop over the child nodes and register a phy_device for each phy */ > > > + for_each_available_child_of_node(np, child) { > > > + if (of_node_name_eq(child, "ethernet-phy-package")) { > > > + rc = of_property_read_u32(child, "reg", &addr); > > > + if (rc) > > > + goto exit; > > > > This means a PHY package node w/o a reg property will prevent all other > > PHYs in the same parent node to be found? > > > > Since this is something new, would it be a problem to make it mandatory > to define a reg? (And return error if we find something? Or print a > warn?) Making reg mandatory within a package is reasonable. Please indicate this in the DT schema. Andrew