From patchwork Tue Oct 1 16:04:21 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: 13818570 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 AA517CEACEA for ; Tue, 1 Oct 2024 17:16:43 +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:Date:Message-Id:Content-Type :Content-Transfer-Encoding:MIME-Version:Subject:Cc:To:From:References: In-Reply-To:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=9g72xzBXGrc10DA+eWe+Gs/39JKsuvziiPT5W/UDDiI=; b=AnTY0kIBTlcfka2Rjhnu7xfiqz OAdgR2CQUgyjm1nqSCJ6P3/Ql/VduKFYnU7so/dV9W382q+juu3YNO8Nk+vi5Y6iuYKGNntUAf30u bNXsch4cYLHj7z7eRmndVDCcf02yEVZlfsMaMVZWgfTx0A7nLUXAeoui0uxJA30rlrDsr1ifPM103 cvlj2IpGUVd8Kg+6+ezj9YYmbU+EDprxy1DxkqtKB6Nsq7E1NE9VbGHwanYeWfOvcW+idhkMIZpuZ wIUrQt0uzsE7/YzixULgBmO/bWDPPwcQ8VaiA3/F0WZldffd1pl9auQlLNZPpUrNZ4isfUP6gUSS4 Q1HTy1sQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1svgUC-00000003doK-2CWW; Tue, 01 Oct 2024 17:16:32 +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 1svfMX-00000003Q8K-21TQ for linux-arm-kernel@lists.infradead.org; Tue, 01 Oct 2024 16:04:34 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Date:Sender:Message-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:Subject:Cc:To:From:References: In-Reply-To:Reply-To: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=9g72xzBXGrc10DA+eWe+Gs/39JKsuvziiPT5W/UDDiI=; b=j4VaZRGSfG4bx8FwfakKHsR1bQ ML11Z5DPSSbGmulJcLCu/g64gzW+MYq6W/lmbb1FuQ4Q5lzNimylHs8lt+6e4RvjdyhnHsDVT6pUq 0HlwD848PwaId1Crf4mGW2Ji0BsoyMaGF3q6MNpfh1dNZAs0dUw/MU7dnzyCvtZxGEfdhmlmy+cs4 a8aD8J4oxLY3kIt/5syfTEpAk8lu8szJVsfe5EoUVuV7x4a1VXkmUsctc+Z1VRfaA2vK2u2Udze2c nl3ZVbCSmZexpu0bG8Z845OwDm+9cAjQK1Wt3N+lLTAOozHVSvRIyJFtG2miOo1HPTiH6ywidKd9F LnPBy1iw==; Received: from e0022681537dd.dyn.armlinux.org.uk ([fd8f:7570:feb6:1:222:68ff:fe15:37dd]:33288 helo=rmk-PC.armlinux.org.uk) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1svfMM-00065Z-35; Tue, 01 Oct 2024 17:04:22 +0100 Received: from rmk by rmk-PC.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1svfML-005ZIF-84; Tue, 01 Oct 2024 17:04:21 +0100 In-Reply-To: References: 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 net-next 03/10] net: pcs: xpcs: get rid of xpcs_init_iface() MIME-Version: 1.0 Content-Disposition: inline Message-Id: Date: Tue, 01 Oct 2024 17:04:21 +0100 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241001_090433_551653_2CF91095 X-CRM114-Status: GOOD ( 12.62 ) 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 xpcs_init_iface() no longer does anything with the interface mode, and now merely does configuration related to the PMA ID. Move this back into xpcs_create() as it doesn't warrant being a separate function anymore. Reviewed-by: Vladimir Oltean Signed-off-by: Russell King (Oracle) --- drivers/net/pcs/pcs-xpcs.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/drivers/net/pcs/pcs-xpcs.c b/drivers/net/pcs/pcs-xpcs.c index 2d8cc3959b4c..8765b01c0b5d 100644 --- a/drivers/net/pcs/pcs-xpcs.c +++ b/drivers/net/pcs/pcs-xpcs.c @@ -1483,16 +1483,6 @@ static int xpcs_init_id(struct dw_xpcs *xpcs) return 0; } -static int xpcs_init_iface(struct dw_xpcs *xpcs) -{ - if (xpcs->info.pma == WX_TXGBE_XPCS_PMA_10G_ID) - xpcs->pcs.poll = false; - else - xpcs->need_reset = true; - - return 0; -} - static struct dw_xpcs *xpcs_create(struct mdio_device *mdiodev) { struct dw_xpcs *xpcs; @@ -1510,9 +1500,10 @@ static struct dw_xpcs *xpcs_create(struct mdio_device *mdiodev) if (ret) goto out_clear_clks; - ret = xpcs_init_iface(xpcs); - if (ret) - goto out_clear_clks; + if (xpcs->info.pma == WX_TXGBE_XPCS_PMA_10G_ID) + xpcs->pcs.poll = false; + else + xpcs->need_reset = true; return xpcs;