Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp833660lqj; Mon, 3 Jun 2024 02:05:08 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUmaqya4AhREPriJoOXH4y55MiZoZw/hhIFa5rPlmQxciOf+9MNrFgFLwu6qQ9McMbmJgfhhcJ6s0edX0EgQ8G1iB6AddaQ6OCDB+kuhg== X-Google-Smtp-Source: AGHT+IGEWrQsL2pL95StyLVXEz4rfsOowd9rj8RyUlalLbNHJJ7Fi3ixe0o4r80irhOAMVWkSAzU X-Received: by 2002:a50:f616:0:b0:572:4041:5637 with SMTP id 4fb4d7f45d1cf-57a3638f302mr5268392a12.19.1717405507644; Mon, 03 Jun 2024 02:05:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717405507; cv=pass; d=google.com; s=arc-20160816; b=hKt8WFEoEZYquVyqDYJNtnzImHJvqF6+HkEot5uEP4xF5Bf+JP3jLr4kTPN0OG3Q/M Fa93J9qsAasFIIr3Wss62TceDDrK8+OF9lk/mgj8eioZy9Uvex4REpp44rmET4Ym7ye6 F9Wbt+tglzyJxZx8kMnhtttAR3HTgR7anEA7WAMPMkb5thquo3j0QdN/LE3j8qV54u6I YI9mc/rP8BY/F44W4QQP39bs15EQ5G3YBeCs26uEJLx0A0g0dUoVD0PVZb02aOVkvdwE 1vhnerTOHuR5c7og9boIxUhhCNdzDJoARCuP89IK26x0zxovrV/dqz0wgUL2mbhNo2vJ ENFg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender: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=PL2tpWgubRP0I1wFdl1ZHWzMi0qsZ0DU3zEaEHooRQY=; fh=X9HnjzwGIAFUnEPUJsbiTzl31Yp990cY1C8edNj7KTQ=; b=oCBf+quFqyS45yYozHE4orjI6FqYFGUxC+4q4Z6kMi/a73yfAHLJkwP3mROyJnePO2 54gKcRd/4DgH5t6XnFl3oeobgnLxXnoxfUnvIOUxT8192et+u9/56Px2Jx7BtQk1fDGd eiz3EpppkH34akdBB3dWZU6hUI05VCFUoV3L+3A4E2fRKHEwq0P9tGqhWCn/yx4Nj5Yf +MyManbbpajUBcXMSvj8kHbDGeIAwZ++5qX8vijuYAI4HAcADKmyyIUU4onc8oxs0/rX 1LkneouaDsju1CQ3VpOY0C0bggzufn8JDbwWsd9CNow0du1hY3pXe+ynhDQME9BZNX+X G5QQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b="B/GXgkrR"; arc=pass (i=1 dkim=pass dkdomain=armlinux.org.uk dmarc=pass fromdomain=armlinux.org.uk); spf=pass (google.com: domain of linux-kernel+bounces-198830-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198830-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57a31cb820dsi3838665a12.615.2024.06.03.02.05.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 02:05:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-198830-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b="B/GXgkrR"; arc=pass (i=1 dkim=pass dkdomain=armlinux.org.uk dmarc=pass fromdomain=armlinux.org.uk); spf=pass (google.com: domain of linux-kernel+bounces-198830-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198830-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 6188A1F217CE for ; Mon, 3 Jun 2024 09:05:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 04D458062B; Mon, 3 Jun 2024 09:04:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="B/GXgkrR" Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [78.32.30.218]) (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 ABB277E792; Mon, 3 Jun 2024 09:04:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=78.32.30.218 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717405478; cv=none; b=nm78hbIYHCf0A+qCrp9zAYi9Fr1P95WxN53kbc02WXwdAmyzMTkhCKAm12NygQ4JUDEZiItZMXYitZku4WLAuqZKHzqNNhY7DTjlrUPiYuNkjJhaQQXozy8tpqGMmEAIqpi1rHXE+YPU2TXZT4o+rz+Ko6oTZBNsF5PrdCxkXCA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717405478; c=relaxed/simple; bh=k7Hy66vX/C6sOWjPSgDZazgLPHPy3ibQ3Zr6PMgovpE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=KePc425jyShjkqFKFb0YmNssI6hliVjmoJcsz4E9IsnIBvK/5d6pajST28Yzl0qkdhx2CZAtNPRznGulAzzGTQUrV8sccLJTc3HOUJ6UjICu4/o5rjZvF4Uvgd5LEIC3xcSrYxlzjABCeSii/fh0PBWd0x/mm4EnR2eR7rACVPU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk; spf=none smtp.mailfrom=armlinux.org.uk; dkim=pass (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b=B/GXgkrR; arc=none smtp.client-ip=78.32.30.218 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=armlinux.org.uk 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=PL2tpWgubRP0I1wFdl1ZHWzMi0qsZ0DU3zEaEHooRQY=; b=B/GXgkrRVf4Kx2g9TuilFMzYS2 U9NTJ5sySISyPgH9X1HT28urmVye+m8mf3bX59ZQDteLTM3jnFc1Kzc+tmlAFyVnmxXtbYs0av3NO OmLqHpnPC3byTnIq33a+gZJnip3nRKGZul8W89TBkvBRFJ3JHiAwenoET9L5h8IZwUzENpMQUAMOp uZWQu6OKtFlZCvBAv4hF9G3Y3hTj/hTIKsrrPn661EXWRJZ/hIJmtTR9est5xH+53rgZ7RoQL2Dnr KDSvpFP9+i3sAVYcUhzW8UeuDOaW9ZGHARWbtggPnAP4+E0DPiweET4f+R95aIdfxnRFa9XdvgzvH ZnB0owOQ==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:45002) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1sE3bi-0002Tb-2G; Mon, 03 Jun 2024 10:03:58 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1sE3be-0000IR-OA; Mon, 03 Jun 2024 10:03:54 +0100 Date: Mon, 3 Jun 2024 10:03:54 +0100 From: "Russell King (Oracle)" To: Serge Semin Cc: Andrew Lunn , Heiner Kallweit , Alexandre Torgue , Jose Abreu , Jose Abreu , Vladimir Oltean , Florian Fainelli , Maxime Chevallier , Rob Herring , Krzysztof Kozlowski , Conor Dooley , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Sagar Cheluvegowda , Abhishek Chauhan , Andrew Halaney , Jiawen Wu , Mengyuan Lou , Tomer Maimon , openbmc@lists.ozlabs.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH net-next v2 10/10] net: stmmac: Add DW XPCS specified via "pcs-handle" support Message-ID: References: <20240602143636.5839-1-fancer.lancer@gmail.com> <20240602143636.5839-11-fancer.lancer@gmail.com> <2lpomvxhmh7bxqhkuexukztwzjfblulobepmnc4g4us7leldgp@o3a3zgnpua2a> 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: <2lpomvxhmh7bxqhkuexukztwzjfblulobepmnc4g4us7leldgp@o3a3zgnpua2a> Sender: Russell King (Oracle) On Mon, Jun 03, 2024 at 11:54:22AM +0300, Serge Semin wrote: > > if (priv->plat->pcs_init) { > > ret = priv->plat->pcs_init(priv); > > > + } else if (fwnode_property_present(devnode, "pcs-handle")) { > > + pcsnode = fwnode_find_reference(devnode, "pcs-handle", 0); > > + xpcs = xpcs_create_fwnode(pcsnode, mode); > > + fwnode_handle_put(pcsnode); > > + ret = PTR_ERR_OR_ZERO(xpcs); > > Just figured, we might wish to be a bit more portable in the > "pcs-handle" property semantics implementation seeing there can be at > least three different PCS attached: > DW XPCS > Lynx PCS > Renesas RZ/N1 MII > > Any suggestion of how to distinguish the passed handle? Perhaps > named-property, phandle argument, by the compatible string or the > node-name? I can't think of a reasonable solution to this at the moment. One solution could be pushing this down into the platform code to deal with as an interim solution, via the new .pcs_init() method. We could also do that with the current XPCS code, since we know that only Intel mGBE uses xpcs. This would probably allow us to get rid of the has_xpcs flag. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!