From patchwork Mon Sep 23 14:01:10 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: 13809627 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 2DF86CF9C70 for ; Mon, 23 Sep 2024 14:04: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: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=isI9/PQ4DNC7EKY1B/11YlS7bxB+io0C0j25LXSzHHY=; b=IGGSwb92hSYm2nj3p4upwb3hP8 0sn3yHIDgd/Fe5bjnkxaaBBvqYN13y26R3k4kQrTw8lx7WwcSl4tavRfjs+oFuQnF2M1Nb0qYOsP1 VbA516PHC9lqELcq/D5TUF5a7p9fr2B2UPmBuWkUbXIPFcb4yGoHRrk0TdClz3+IFKmlZeLAB3ru/ ZxbIVVUpkkDJOF969++Q9wC1qJN4W0bZfXbGsbJdbw1BlJkYOJVy6HmOuiw3nDicjbTf6Xi99Yyw8 mrtqefmeX8M2MhNNzIkfFaDwyRdlDXwPqvzkmgR9XfdKmzBa8FMG59wbGDFPuh7DMbI2wI/WPHn5f xvQy3rfA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1ssjg8-0000000HKoc-38yS; Mon, 23 Sep 2024 14:04: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 1ssjcw-0000000HKKT-17k4 for linux-arm-kernel@lists.infradead.org; Mon, 23 Sep 2024 14:01:23 +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=isI9/PQ4DNC7EKY1B/11YlS7bxB+io0C0j25LXSzHHY=; b=xJNnFaT2NHx16n7wv0Nu4a1Rsf xNjbRMpG15/iOSxgO1mVSTXH82KTiZhtgKVzonPbF1ultXD1sed1nqg4lSFTAOZdddVRixh54vIOv QcX3eFkCoGp7gkspMvZ+db81CPVX/ZBiBpQ7E8BcBfzqn+W5zhneQr03+yToAtbeW79upE91OliXe WUjcMjnV49JuAK5DFkbnd7a903cz5g/EZ6PVNmsrNar3xtXBVxjIqkQEX3QklnM0/vuz7l7Uvtjj+ xJx7LD5MhvJSyJ8U6G6Jc0kwWcgVmvJwne50TaNB89ew91OG2pIY53mr3kDgCT9k0zQI9GwKSZXSD IzqPTChQ==; Received: from e0022681537dd.dyn.armlinux.org.uk ([fd8f:7570:feb6:1:222:68ff:fe15:37dd]:56744 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 1ssjcl-0004HY-1o; Mon, 23 Sep 2024 15:01:11 +0100 Received: from rmk by rmk-PC.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1ssjck-005Nrr-2B; Mon, 23 Sep 2024 15:01:10 +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 RFC net-next 03/10] net: pcs: xpcs: get rid of xpcs_init_iface() MIME-Version: 1.0 Content-Disposition: inline Message-Id: Date: Mon, 23 Sep 2024 15:01:10 +0100 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240923_070122_369266_11E5055E X-CRM114-Status: GOOD ( 12.56 ) 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. Signed-off-by: Russell King (Oracle) Reviewed-by: Vladimir Oltean --- 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;