From patchwork Mon Sep 23 14:00:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Russell King (Oracle)" X-Patchwork-Id: 13809635 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 83E2FCF9C69 for ; Mon, 23 Sep 2024 14:13:52 +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:Content-Type:MIME-Version: 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:In-Reply-To:References:List-Owner; bh=rlbTSzoMwe9Gz7cOZS88v/Qn7t4z6TgShE6pjDg4V1k=; b=U48KBtuQvC85fqGZlTYNqJviZR SCdSsrGYezLcpoaJYv8QO3ceKSHLUKwf0zrhEqw4oL8n+g+2Ps+5465MzYFFvYoVwkeQhy8OU0f4o md+Fi1pssuQFCjpFnzDJAEckoRaYPaQQ+j0XiBdJOuDC6XU4NyJ+ie+tCsDjZXD3z9y43ejBG5Rxx tgkxKj4sVzulYMGpPwQKFAabijSXZOqYUvE1AgUrKTBK9kVi2Z8A+U6behYymn1j3HtQAGXqVjHG6 BoatOSJdyzwdxmjM6aU58M4koi+NKGCUzjiz8odQ3ywEqOUkgTvkJD7WRbbGAqFz9x/7/wzcGVpOh C0wOns5g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1ssjoq-0000000HLkK-3S4q; Mon, 23 Sep 2024 14:13:40 +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 1ssjeX-0000000HKFo-1Ur0 for linux-arm-kernel@lists.infradead.org; Mon, 23 Sep 2024 14:03:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:Content-Type:MIME-Version: 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:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=rlbTSzoMwe9Gz7cOZS88v/Qn7t4z6TgShE6pjDg4V1k=; b=A4FHBbQhqKW7VgJM5LpclvPSZy czYMWcV6w2EfKbTnq1cJ3SacoYM6cOTN2aEkMLpdEyRbTsCuIqw863Vzf0gicAwfpUj4B0EqLUq0T vvOiHYC55hjeng9BpqsQxaQwIfDISbIlr/8AvLtdI++cbbnJRKuUKIJRwA+BcSAy17h+PNjgBmMYT eR/K2cClBpu70SIz/W4TqJF4T1+g2OjWWCK5PYLc92liq1wRje34i3Wl+k5npj3Y7kp60EH8glv5D 1HGTO+KELiRTMu/6LYGzy5cIo9GRkqiL4Q1zx46dKiKiZwhU5njSt+Vq6cdWX36CUIR4+jsDthdtl nnU+KSqw==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:49610) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1ssjcB-0004Gt-19; Mon, 23 Sep 2024 15:00:35 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.96) (envelope-from ) id 1ssjc2-0005RQ-1V; Mon, 23 Sep 2024 15:00:26 +0100 Date: Mon, 23 Sep 2024 15:00:26 +0100 From: "Russell King (Oracle)" To: Andrew Lunn , Heiner Kallweit Cc: 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 , Vladimir Oltean Subject: [PATCH RFC 00/10] net: pcs: xpcs: cleanups batch 1 Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240923_070301_427567_EF2FD053 X-CRM114-Status: GOOD ( 15.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 Hi, First, sorry for the bland series subject - this is the first in a number of cleanup series to the XPCS driver. This series has some functional changes beyond merely cleanups, notably the first patch. This series starts off with a patch that moves the PCS reset from the xpcs_create*() family of calls to when phylink first configures the PHY. The motivation for this change is to get rid of the interface argument to the xpcs_create*() functions, which I see as unnecessary complexity. This patch needs testing on SJA1105, Wangxun and STMMAC drivers. Patch 2 removes the now unnecessary interface argument from the internal xpcs_create() and xpcs_init_iface() functions. With this, xpcs_init_iface() becomes a misnamed function, but patch 3 removes this function, moving its now meager contents to xpcs_create(). Patch 4 adds xpcs_destroy_pcs() and xpcs_create_pcs_mdiodev() functions which return and take a phylink_pcs, allowing SJA1105 and Wangxun drivers to be converted to using the phylink_pcs structure internally. Patches 5 through 8 convert both these drivers to that end. Patch 9 drops the interface argument from the remaining xpcs_create*() functions, addressing the only remaining caller of these functions, that being the STMMAC driver. As patch 7 removed the direct calls to the XPCS config/link-up functions, the last patch makes these functions static. drivers/net/dsa/sja1105/sja1105.h | 2 +- drivers/net/dsa/sja1105/sja1105_main.c | 83 ++++++++++---------- drivers/net/dsa/sja1105/sja1105_mdio.c | 28 ++++--- drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 7 +- drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c | 18 ++--- drivers/net/ethernet/wangxun/txgbe/txgbe_type.h | 2 +- drivers/net/pcs/pcs-xpcs.c | 92 ++++++++++++++--------- include/linux/pcs/pcs-xpcs.h | 14 ++-- 8 files changed, 130 insertions(+), 116 deletions(-)