Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp294921rdb; Tue, 5 Dec 2023 05:52:50 -0800 (PST) X-Google-Smtp-Source: AGHT+IFq62wxRZzN8fBsIYm/pxAblnEuH8KGmV1BEaeEbgX3jrdMpRwgM7xoGFmGErU9DpIY7j75 X-Received: by 2002:a92:c08e:0:b0:35d:59a2:bc4 with SMTP id h14-20020a92c08e000000b0035d59a20bc4mr3592136ile.90.1701784370578; Tue, 05 Dec 2023 05:52:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701784370; cv=none; d=google.com; s=arc-20160816; b=U2bb5voyYp1TvoeS8XAfcGfIzVBnr+kcuBZxWqQ7UwBR4VE/dJ5XoAg+/5N0qZtWTm s3H63xFHCEuDKzt52FMg1cbXxGdUUlVM1J7JPrX0Lhy6hKhyJUcZQDR0PcYxPS48W9dw EmgcbIYmD7H8uGgG18bCpURjrCmpc9ccHM9CVNfK4XG+iwEssqeT1CwHXLi4h5pKcTdC Urkk8QYfFNKGX7nHIrYRmSn0KsqB50GVB88SnpM65Gka4VNGdKc+rblscZdbq8wZI2UE d1YRp1nSqitXsTZtJVvWi/pjLUsAwhpJlCzAEY+eLZwI1232f6wE5l3bIx/zyRiEot9Q ZUfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=fp/k+9cjXPMJD2AI1NBPq4sHcsTLnY0P6a5ilpBrwwI=; fh=FDiRapyXg5DGWREo8Bxe18fnUj+bSTMONCd77TYoVjA=; b=X0uZ3pf4HEjkp4LMB95woJMueIopdRoNc8w9fpk+3k3swLst26Hhn3yR2jrb25s5am aPg4B0a9KkB2TFxlkI4YCKIwMsck19CpRy6wq+j4OT84dYGO/mRFHSE2jMrpaEJWtZqi 3WKbsfcnZMsXv3gv0BeiDWCGMT5SPzQ2MTzIOZVVAvwlxpo3UfwL95XX473ricxToH0r WyUeIejLwASLob+lv8rPmlDGe3xuKYNmUl5fFKCxK5+5rMV1RyERzwf9KsnR11ViasmJ GcSPUZwM+mTXvxjuZ+e7BzmxujUui8GIOuvXbqt+QiyuBZkoXX9WaNgNOfpj78iCMNVX pMng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=NktDqN5j; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id z13-20020a6552cd000000b005aaab9e7bcfsi9657547pgp.388.2023.12.05.05.52.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 05:52:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=NktDqN5j; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 189DA80A5F04; Tue, 5 Dec 2023 05:52:48 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1442255AbjLENwe (ORCPT + 99 others); Tue, 5 Dec 2023 08:52:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345523AbjLENwd (ORCPT ); Tue, 5 Dec 2023 08:52:33 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 51DB012C; Tue, 5 Dec 2023 05:52:39 -0800 (PST) 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=fp/k+9cjXPMJD2AI1NBPq4sHcsTLnY0P6a5ilpBrwwI=; b=NktDqN5jNI5Ylg9ZHDCm/VXu55 z+DTg9FlA8wsQGtB2rP4e07ENtnZ+R782xG+VNf6Ve91GLktgfzGKWa6epkNfgsfR0hUo+dhFhhS3 1CrG3fFgCQUD8ABXHVmW2Siqq94y127Lrsf4p0pvesSlcVu9tV0o9cHVqHfYFhdammPM=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1rAVqa-0026FF-6u; Tue, 05 Dec 2023 14:52:24 +0100 Date: Tue, 5 Dec 2023 14:52:24 +0100 From: Andrew Lunn To: Serge Semin Cc: "Russell King (Oracle)" , Heiner Kallweit , Alexandre Torgue , Jose Abreu , Jose Abreu , Maxime Chevallier , Tomer Maimon , Rob Herring , Krzysztof Kozlowski , Conor Dooley , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , openbmc@lists.ozlabs.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next 06/16] net: pcs: xpcs: Avoid creating dummy XPCS MDIO device Message-ID: References: <20231205103559.9605-1-fancer.lancer@gmail.com> <20231205103559.9605-7-fancer.lancer@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Tue, 05 Dec 2023 05:52:48 -0800 (PST) On Tue, Dec 05, 2023 at 02:31:41PM +0300, Serge Semin wrote: > On Tue, Dec 05, 2023 at 10:49:47AM +0000, Russell King (Oracle) wrote: > > On Tue, Dec 05, 2023 at 01:35:27PM +0300, Serge Semin wrote: > > > If the DW XPCS MDIO devices are either left unmasked for being auto-probed > > > or explicitly registered in the MDIO subsystem by means of the > > > mdiobus_register_board_info() method there is no point in creating the > > > dummy MDIO device instance in order to get the DW XPCS handler since the > > > MDIO core subsystem will create the device during the MDIO bus > > > registration procedure. > > > > > Please reword this overly long sentence. > > Ok. > > > > > If they're left unmasked, what prevents them being created as PHY > > devices? > > Not sure I fully get what you meant. If they are left unmasked the > MDIO-device descriptor will be created by the MDIO subsystem anyway. > What the point in creating another one? Saying what Russell said, in a different way: /* * Return true if the child node is for a phy. It must either: * o Compatible string of "ethernet-phy-idX.X" * o Compatible string of "ethernet-phy-ieee802.3-c45" * o Compatible string of "ethernet-phy-ieee802.3-c22" * o In the white list above (and issue a warning) * o No compatibility string * * A device which is not a phy is expected to have a compatible string * indicating what sort of device it is. */ bool of_mdiobus_child_is_phy(struct device_node *child) So when walking the bus, if a node is found which fits these criteria, its assumed to be a PHY. Anything on the MDIO bus which is not a PHY needs to use a compatible. Andrew