Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp334814rdb; Tue, 5 Dec 2023 06:51:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IG73A1iu9eP+2BlZGhifUIQGmaGr/L2j3ZI0K7lUahHlVV//ijh861fE32ye0xquoO6HaXO X-Received: by 2002:a17:902:6bcc:b0:1cf:d620:c641 with SMTP id m12-20020a1709026bcc00b001cfd620c641mr5292301plt.22.1701787887466; Tue, 05 Dec 2023 06:51:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701787887; cv=none; d=google.com; s=arc-20160816; b=jzd8xIGdD0CNiPG6chghOraxa5+V6cDn1VcVL79RhL/H8yXAvzYq+9XuCfe57UWHwh 1chn7UJpYosAYvXeOxdi3iFZFWZEqWkK7IacbxKLhk7XFRfX6YNAcuIuZh4wiXceTy6h ldlD8y7pVx1tX20mXtDEANPq9M98TSgbNVoDg5YntKHVm3dussCOw2LsBvsL7kcxOGZe OBJcWgNkpxgGQPNNl18U5qZRoy0zsjy3ujtVYQPwUp0jZL27OndDVgaAZJN075E3BZ29 D9NT/3m89yZKzhKpcQGl95QdrutbOdABn6EPR3VpqN7pvb7Xp95BceKp3FGYDxbf6TuD vNlw== 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-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=lfxnHu+Bi0iwFhaqZvuue6DCeOGeODkmNEtnuTLsk0c=; fh=V60F6mCOx4CzzZwkSUlQ7ApwCOkwBw1xIN6OeB62JVU=; b=E7U+osXi0gGZM6TnNgKX9GpB+kshNKrEwED2Be9q0khvCdPkj6MArWIBZ1QgLA2QLi 658loCOkP3fggkzcCjdyXkSLqskXtPjznF2tYoGHasUk5kIrMNc0N4obB0QMbdkeh8Bl NP4BF6FglrgwKBWWoGwnuuZAZC2OuqC7cQyRVVzBng+kAarUCajLKynhOV0JWzlKJ8g8 2up0TZyjMFdNbQ0uCr+1wy/FONWB62irDLku5acbjiv5zeiX2dmKyC46Z6FacyTYPSfH Wgv3AwKN4Ko+Skeh0O2bRwmrKpOeB0BR48aQ/W6PInQPTjGsYmb9rf9di9fl4VJjNybn w6wA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=nfvNuo59; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id e9-20020a170902b78900b001b045d65aedsi7837342pls.228.2023.12.05.06.51.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 06:51:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=nfvNuo59; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id A6FA48031E0B; Tue, 5 Dec 2023 06:51:26 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345727AbjLEOvO (ORCPT + 99 others); Tue, 5 Dec 2023 09:51:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345682AbjLEOvN (ORCPT ); Tue, 5 Dec 2023 09:51:13 -0500 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 C0AEFCA; Tue, 5 Dec 2023 06:51:18 -0800 (PST) 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=lfxnHu+Bi0iwFhaqZvuue6DCeOGeODkmNEtnuTLsk0c=; b=nfvNuo59MSr8p+SP/ioXzsTPk/ Q0EM36l5MU7bhMCatc8Y31D+ViSTMtJss3YHAfecCj32JxgqcwotTO46FMtykJlJCfDqiDOhl8qiM Kf2oFBxe8UQ+I31Y8/+76VpXP6w7JPoY824CfgXd2kY7dDUZwijviiLdwb0h5Yq2MVqMmhNyNpMpN xXJtwwS4HYuyVQ3iEyb8FSH7W5fiHhCfwbuSWrAWc2m1W29ZAERbJvwCJH8ossvCD1040db8rBHpq 9sY5gOoFrRZhCS5UMne5a73Kh1KbUNamhDqnaxaDUXe6hfWL/CAvlY6fhZVqN3cmiBE90YjpjmznG +6eJp0Ug==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:51056) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1rAWlI-0006ua-05; Tue, 05 Dec 2023 14:51:00 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1rAWlG-0001nZ-P9; Tue, 05 Dec 2023 14:50:58 +0000 Date: Tue, 5 Dec 2023 14:50:58 +0000 From: "Russell King (Oracle)" To: Andrew Lunn Cc: Serge Semin , 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: 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 05 Dec 2023 06:51:26 -0800 (PST) On Tue, Dec 05, 2023 at 02:52:24PM +0100, Andrew Lunn wrote: > 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. Right. I'd actually forgotten about the firmware-based walking, and was thinking more of the non-firmware bus scanning as the commit message was talking about being _unmasked_ and the only mask we have is bus->phy_mask. It seems to me that this is yet another case of a really confusing commit message making review harder than it needs to be. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!