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 9A42DCCFA19 for ; Thu, 26 Sep 2024 11:43:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id: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-Owner; bh=I/a0LbYF1WXMeFMf/ldoVBQRSAUzG4YQ8n7SuE4RzPQ=; b=OV2W6qQqNnFsz2V6Tp+pQvq2vi ByduvUN9VLVlILzqcctCPwmvdgp2XN6khAq4YV+T96W6H78mXHAuUq3iT+JaBa1I2KRqJKHtnl80h 05FobgZ7aGA4jmaBzScIJoqtHAkuzXF1Lr7mHUUVB5ZKuV7+0HwwTGon1tWmAOde5Qkc9XUvRzSYe gt9l/dZ7lUczArgFKMORi2UakLdv6rSexLpNbfrKOBctutfSwCUegki8UmYyeCbDKxiElNTvIqHSc DBU8ZW0PzAHtoNeKfSEw4kvgUzwV6QnLgeNPs0acQxIS3EyDLY7QW/IA1uhjw5BByKRXz2E1lvfqz CB7WbuvA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1stmto-00000008GXO-3rTG; Thu, 26 Sep 2024 11:43:08 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1stmsc-00000008GOX-0xM1 for linux-arm-kernel@lists.infradead.org; Thu, 26 Sep 2024 11:41:56 +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=I/a0LbYF1WXMeFMf/ldoVBQRSAUzG4YQ8n7SuE4RzPQ=; b=LWALQ1E6JAu2FtyvFdIXYV8B9v Tad5KLxC0Z8ei5aNTywchAcRBcm3q/ClmCFVOq/WIP2kKqIbvAnezZNgBT42wmKiYkd08FStb3rbq ovfYxOjq+kgRw4qPviliCrZ3pOIVtgdBUSPCQ6T16fOuiJQ+CijzBp/bH/CH3QzhgVOSqFK1byy23 8/lVaIyhUaT9rKzGwl/kM7hV9RbpmX4slB6nZHIwYnwfeZ+xwWObHE15AQCSJW4MRT/NghAJs+SB+ jNO2Wj+fl0honXdqrVoiEDfZdQlliswuiy+6JJlYHS5ySUfaiHzOpf5Srp0sk/VEsJNkA7aAPzxib 66Xc7y2w==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:54520) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1stmsJ-00088t-3B; Thu, 26 Sep 2024 12:41:35 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.96) (envelope-from ) id 1stmsB-0008IB-28; Thu, 26 Sep 2024 12:41:27 +0100 Date: Thu, 26 Sep 2024 12:41:27 +0100 From: "Russell King (Oracle)" To: Vladimir Oltean Cc: Andrew Lunn , Heiner Kallweit , Alexandre Torgue , "David S. Miller" , Eric Dumazet , Florian Fainelli , Jakub Kicinski , Jiawen Wu , Jose Abreu , Jose Abreu , linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, Maxime Coquelin , Mengyuan Lou , netdev@vger.kernel.org, Paolo Abeni Subject: Re: [PATCH RFC 00/10] net: pcs: xpcs: cleanups batch 1 Message-ID: References: <20240925134337.y7s72tdomvpcehsu@skbuf> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240925134337.y7s72tdomvpcehsu@skbuf> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240926_044154_576879_0469F0E8 X-CRM114-Status: GOOD ( 24.89 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Sep 25, 2024 at 04:43:37PM +0300, Vladimir Oltean wrote: > Hi Russell, > > On Mon, Sep 23, 2024 at 03:00:26PM +0100, Russell King (Oracle) wrote: > > First, sorry for the bland series subject - this is the first in a > > number of cleanup series to the XPCS driver. > > I presume you intend to remove the rest of the exported xpcs functions > as well, in further "batches". Could you share in advance some details > about what you plan to do with xpcs_get_an_mode() as used in stmmac? I've been concentrating more on the sja1105 and wangxun users with this cleanup, as changing stmmac is going to be quite painful - so I've left this as something for the future. stmmac already stores a phylink_pcs pointer, but we can't re-use that for XPCS because stmmac needs to know that it's an XPCS vs some other PCS due to the direct calls such as xpcs_get_an_mode() and xpcs_config_eee(). When I was working on EEE support at phylink level, I did try to figure out what xpcs_config_eee() is all about, what it's trying to do, why, and how it would fit into any phylink-based EEE scheme, but I never got very far with that due to lack of documentation. So, at the moment I have no plans to touch the prototypes of xpcs_get_an_mode(), xpcs_config_eee() nor xpcs_get_interfaces(). With the entire patch series being so large already, I'm in no hurry to add patches for this - which would need yet more work on stmmac that I'm no longer willing to do. > if (xpcs_get_an_mode(priv->hw->xpcs, mode) != DW_AN_C73)) > > I'm interested because I actually have some downstream NXP patches which > introduce an entirely new MLO_AN_C73 negotiating mode in phylink (though > they don't convert XPCS to it, sadly). Just wondering where this is going > in your view. To give a flavour of what remains: net: pcs: xpcs: move Wangxun VR_XS_PCS_DIG_CTRL1 configuration net: pcs: xpcs: correctly place DW_VR_MII_DIG_CTRL1_2G5_EN net: pcs: xpcs: use dev_*() to print messages net: pcs: xpcs: convert to use read_poll_timeout() net: pcs: xpcs: add _modify() accessors net: pcs: xpcs: use FIELD_PREP() and FIELD_GET() net: pcs: xpcs: convert to use linkmode_adv_to_c73() net: pcs: xpcs: add xpcs_linkmode_supported() net: mdio: add linkmode_adv_to_c73() net: pcs: xpcs: move searching ID list out of line net: pcs: xpcs: rename xpcs_get_id() net: pcs: xpcs: move definition of struct dw_xpcs to private header net: pcs: xpcs: provide a helper to get the phylink pcs given xpcs net: pcs: xpcs: pass xpcs instead of xpcs->id to xpcs_find_compat() net: pcs: xpcs: don't use array for interface net: pcs: xpcs: remove dw_xpcs_compat enum which looks like this on the diffstat: drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c | 2 +- drivers/net/pcs/pcs-xpcs-nxp.c | 24 +- drivers/net/pcs/pcs-xpcs-wx.c | 51 +-- drivers/net/pcs/pcs-xpcs.c | 521 +++++++++------------- drivers/net/pcs/pcs-xpcs.h | 42 +- include/linux/mdio.h | 40 ++ include/linux/pcs/pcs-xpcs.h | 19 +- 7 files changed, 303 insertions(+), 396 deletions(-) -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!