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: 13809617 X-Patchwork-Delegate: kuba@kernel.org 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 28DB82AEE7 for ; Mon, 23 Sep 2024 14:01:26 +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=1727100089; cv=none; b=I/AHQ3NUyJbb3AJIi87VpnPeXq/EBql6yusmeOgVIn1LTmfEbyJy2aBSzJaWPC1tpRJlI6hOetjgyf7+N6W1LfhBtSNymlyonYf3jT3WuTVV26bMLn4InQN/lv+Yp4+xO+XLbQEzgr4JDQ65shkAfB7j6mUV6QfJIjVuXH70IfY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727100089; c=relaxed/simple; bh=q0SkBAeWeq27d40SPzPo56etH1Px97gJCkY+idRnfd4=; h=In-Reply-To:References:From:To:Cc:Subject:MIME-Version: Content-Disposition:Content-Type:Message-Id:Date; b=hTlyUHFRJcvi6HB7MB9Xf+Pe8pNtDy8vgiywf1zl59rdfQBoSr7Q+vHlqPkDf9mn2iXvuRhwa5O4mojD4+8FgEwbdqbySdRgDJr69YaOLlCoCj0h1tUkJrPc9Pq+KG0eEPagAEaMr0nWZRL79EmM1kF76qXPflMc6vSsjejE2/4= 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=xJNnFaT2; 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="xJNnFaT2" 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() Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline Message-Id: Sender: Russell King Date: Mon, 23 Sep 2024 15:01:10 +0100 X-Patchwork-Delegate: kuba@kernel.org X-Patchwork-State: RFC 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;