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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CA565C25B75 for ; Mon, 3 Jun 2024 09:14:51 +0000 (UTC) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.a=rsa-sha256 header.s=pandora-2019 header.b=B/GXgkrR; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4Vt7N93v5Fz3cRB for ; Mon, 3 Jun 2024 19:14:49 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.a=rsa-sha256 header.s=pandora-2019 header.b=B/GXgkrR; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=armlinux.org.uk (client-ip=2001:4d48:ad52:32c8:5054:ff:fe00:142; helo=pandora.armlinux.org.uk; envelope-from=linux+openbmc=lists.ozlabs.org@armlinux.org.uk; receiver=lists.ozlabs.org) X-Greylist: delayed 546 seconds by postgrey-1.37 at boromir; Mon, 03 Jun 2024 19:13:53 AEST Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4Vt7M51Q9jz30VP for ; Mon, 3 Jun 2024 19:13:52 +1000 (AEST) 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 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2lpomvxhmh7bxqhkuexukztwzjfblulobepmnc4g4us7leldgp@o3a3zgnpua2a> X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Lunn , Tomer Maimon , Alexandre Torgue , Eric Dumazet , Krzysztof Kozlowski , Sagar Cheluvegowda , linux-stm32@st-md-mailman.stormreply.com, Florian Fainelli , openbmc@lists.ozlabs.org, Maxime Chevallier , Jose Abreu , Abhishek Chauhan , Jakub Kicinski , Paolo Abeni , Andrew Halaney , Jose Abreu , devicetree@vger.kernel.org, Conor Dooley , Jiawen Wu , linux-arm-kernel@lists.infradead.org, Mengyuan Lou , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Rob Herring , Maxime Coquelin , Vladimir Oltean , "Da vid S. Miller" , Heiner Kallweit Errors-To: openbmc-bounces+openbmc=archiver.kernel.org@lists.ozlabs.org Sender: "openbmc" 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! 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0843FC25B75 for ; Mon, 3 Jun 2024 09:05:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=exSeLlMEf/sofYjkmG/VcItSEiHozqct4DnAHGWbEcA=; b=kuirqZxb3GJkm+ p7dyygOwVIjV0BONIrKq1RCDhQgXk0O4QkrPQF12Fkg77yEMrH130sBpGHW8aSxTjMX+YV9764RaI CF8dz+1g10FbMpyDdbpRrCUEM+ark4aGgsa8vnTTBqQ+BLtWlgElOQj8Q3Dwh36YhrqSOkEGx9zlT 2mkVvj0A29QotQ05mbmB9Sgx0xnsazASxnF0lB3EgW/fdDFossaBNDBrckrSwjoKbl4BpqIS8oV4Q dnceK5DvRclEDqBmlx3YZSLb8xv92cPphOxZcY/XKXBbRXMNda2zbWnbIBda1UwxT6U8FChdoCNJG u+0Zc4nEynLPYHdQXRXQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sE3cX-0000000G86W-478S; Mon, 03 Jun 2024 09:04:49 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sE3cU-0000000G856-3oJ5 for linux-arm-kernel@lists.infradead.org; Mon, 03 Jun 2024 09:04:48 +0000 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> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <2lpomvxhmh7bxqhkuexukztwzjfblulobepmnc4g4us7leldgp@o3a3zgnpua2a> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240603_020446_973383_B32F21D7 X-CRM114-Status: GOOD ( 17.31 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="B/GXgkrR" 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: devicetree@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!