linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
To: Andrew Lunn <andrew@lunn.ch>, Heiner Kallweit <hkallweit1@gmail.com>
Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Jakub Kicinski <kuba@kernel.org>,
	Jiawen Wu <jiawenwu@trustnetic.com>,
	Jose Abreu <joabreu@synopsys.com>,
	Jose Abreu <Jose.Abreu@synopsys.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-stm32@st-md-mailman.stormreply.com,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Mengyuan Lou <mengyuanlou@net-swift.com>,
	netdev@vger.kernel.org, Paolo Abeni <pabeni@redhat.com>,
	Vladimir Oltean <olteanv@gmail.com>
Subject: [PATCH net-next 03/10] net: pcs: xpcs: get rid of xpcs_init_iface()
Date: Tue, 01 Oct 2024 17:04:21 +0100	[thread overview]
Message-ID: <E1svfML-005ZIF-84@rmk-PC.armlinux.org.uk> (raw)
In-Reply-To: <ZvwdKIp3oYSenGdH@shell.armlinux.org.uk>

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 <vladimir.oltean@nxp.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
---
 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;
 
-- 
2.30.2



  parent reply	other threads:[~2024-10-01 17:16 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-01 16:02 [PATCH net-next 00/10] net: pcs: xpcs: cleanups batch 1 Russell King (Oracle)
2024-10-01 16:04 ` [PATCH net-next 01/10] net: pcs: xpcs: move PCS reset to .pcs_pre_config() Russell King (Oracle)
2024-10-01 20:34   ` Serge Semin
2024-10-01 22:01     ` Russell King (Oracle)
2024-10-01 22:09       ` Andrew Lunn
2024-10-02 22:56         ` Serge Semin
2024-10-02 23:12           ` Andrew Lunn
2024-10-02 23:43             ` Serge Semin
2024-10-03  0:04               ` Andrew Lunn
2024-10-03  8:58                 ` Russell King (Oracle)
2024-10-03 23:39                 ` Serge Semin
2024-10-02 23:25           ` Russell King (Oracle)
2024-10-01 16:04 ` [PATCH net-next 02/10] net: pcs: xpcs: drop interface argument from internal functions Russell King (Oracle)
2024-10-01 16:04 ` Russell King (Oracle) [this message]
2024-10-01 16:04 ` [PATCH net-next 04/10] net: pcs: xpcs: add xpcs_destroy_pcs() and xpcs_create_pcs_mdiodev() Russell King (Oracle)
2024-10-01 16:04 ` [PATCH net-next 05/10] net: wangxun: txgbe: use phylink_pcs internally Russell King (Oracle)
2024-10-01 22:12   ` Andrew Lunn
2024-10-01 16:04 ` [PATCH net-next 06/10] net: dsa: sja1105: simplify static configuration reload Russell King (Oracle)
2024-10-01 16:04 ` [PATCH net-next 07/10] net: dsa: sja1105: call PCS config/link_up via pcs_ops structure Russell King (Oracle)
2024-10-01 16:04 ` [PATCH net-next 08/10] net: dsa: sja1105: use phylink_pcs internally Russell King (Oracle)
2024-10-01 16:04 ` [PATCH net-next 09/10] net: pcs: xpcs: drop interface argument from xpcs_create*() Russell King (Oracle)
2024-10-01 16:04 ` [PATCH net-next 10/10] net: pcs: xpcs: make xpcs_do_config() and xpcs_link_up() internal Russell King (Oracle)
2024-10-03  0:40 ` [PATCH net-next 00/10] net: pcs: xpcs: cleanups batch 1 patchwork-bot+netdevbpf
2024-10-04 23:29 ` Serge Semin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1svfML-005ZIF-84@rmk-PC.armlinux.org.uk \
    --to=rmk+kernel@armlinux.org.uk \
    --cc=Jose.Abreu@synopsys.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=jiawenwu@trustnetic.com \
    --cc=joabreu@synopsys.com \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=mengyuanlou@net-swift.com \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).