From: "Russell King (Oracle)" <rmk+kernel@armlinux•org.uk>
To: Andrew Lunn <andrew@lunn•ch>, Heiner Kallweit <hkallweit1@gmail•com>
Cc: Daniel Machon <daniel.machon@microchip•com>,
"David S. Miller" <davem@davemloft•net>,
Eric Dumazet <edumazet@google•com>,
Florian Fainelli <f.fainelli@gmail•com>,
Horatiu Vultur <horatiu.vultur@microchip•com>,
Ioana Ciornei <ioana.ciornei@nxp•com>,
Jakub Kicinski <kuba@kernel•org>,
Lars Povlsen <lars.povlsen@microchip•com>,
linux-arm-kernel@lists•infradead.org,
Madalin Bucur <madalin.bucur@nxp•com>,
Marcin Wojtas <mw@semihalf•com>,
Michal Simek <michal.simek@amd•com>,
netdev@vger•kernel.org, Paolo Abeni <pabeni@redhat•com>,
Radhey Shyam Pandey <radhey.shyam.pandey@xilinx•com>,
Sean Anderson <sean.anderson@seco•com>,
Steen Hegelund <Steen.Hegelund@microchip•com>,
Taras Chornyi <taras.chornyi@plvision•eu>,
Thomas Petazzoni <thomas.petazzoni@bootlin•com>,
UNGLinuxDriver@microchip•com, Vladimir Oltean <olteanv@gmail•com>
Subject: [PATCH RFC net-next 5/9] net: mvneta: switch PCS driver to use phylink_pcs_neg_mode()
Date: Tue, 23 May 2023 16:55:30 +0100 [thread overview]
Message-ID: <E1q1UME-007FT0-Dw@rmk-PC.armlinux.org.uk> (raw)
In-Reply-To: <ZGzhvePzPjJ0v2En@shell.armlinux.org.uk>
Use the newly introduced phylink_pcs_neg_mode() to configure whether
inband-AN should be used.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux•org.uk>
---
drivers/net/ethernet/marvell/mvneta.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
index e2abc00d0472..d669276639b1 100644
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -4009,6 +4009,7 @@ static int mvneta_pcs_config(struct phylink_pcs *pcs,
{
struct mvneta_port *pp = mvneta_pcs_to_port(pcs);
u32 mask, val, an, old_an, changed;
+ unsigned int neg_mode;
mask = MVNETA_GMAC_INBAND_AN_ENABLE |
MVNETA_GMAC_INBAND_RESTART_AN |
@@ -4016,7 +4017,9 @@ static int mvneta_pcs_config(struct phylink_pcs *pcs,
MVNETA_GMAC_AN_FLOW_CTRL_EN |
MVNETA_GMAC_AN_DUPLEX_EN;
- if (phylink_autoneg_inband(mode)) {
+ neg_mode = phylink_pcs_neg_mode(mode, interface, advertising);
+
+ if (neg_mode == PHYLINK_PCS_NEG_INBAND_ENABLED) {
mask |= MVNETA_GMAC_CONFIG_MII_SPEED |
MVNETA_GMAC_CONFIG_GMII_SPEED |
MVNETA_GMAC_CONFIG_FULL_DUPLEX;
--
2.30.2
next prev parent reply other threads:[~2023-05-23 15:55 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-23 15:54 [PATCH RFC 0/9] Add and use helper for PCS negotiation modes Russell King (Oracle)
2023-05-23 15:55 ` [PATCH RFC net-next 1/9] net: phylink: add phylink_pcs_neg_mode() Russell King (Oracle)
2023-05-23 15:55 ` [PATCH RFC net-next 2/9] net: phylink: use phylink_pcs_neg_mode() Russell King (Oracle)
2023-05-23 15:55 ` [PATCH RFC net-next 3/9] net: phylink: pass aneg_mode into phylink_mii_c22_pcs_config() Russell King (Oracle)
2023-05-23 15:55 ` [PATCH RFC net-next 4/9] net: qca8k: switch PCS driver to use phylink_pcs_neg_mode() Russell King (Oracle)
2023-05-23 15:55 ` Russell King (Oracle) [this message]
2023-05-23 15:55 ` [PATCH RFC net-next 6/9] net: mvpp2: " Russell King (Oracle)
2023-05-23 15:55 ` [PATCH RFC net-next 7/9] net: prestera: " Russell King (Oracle)
2023-05-24 11:38 ` [EXT] " Elad Nachman
2023-05-23 15:55 ` [PATCH RFC net-next 8/9] net: lan966x: " Russell King (Oracle)
2023-05-23 15:55 ` [PATCH RFC net-next 9/9] net: sparx5: " Russell King (Oracle)
2023-05-30 12:49 ` Daniel Machon
2023-05-24 7:26 ` [PATCH RFC 0/9] Add and use helper for PCS negotiation modes Horatiu Vultur
2023-05-24 8:10 ` Russell King (Oracle)
2023-05-25 8:15 ` Russell King (Oracle)
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=E1q1UME-007FT0-Dw@rmk-PC.armlinux.org.uk \
--to=rmk+kernel@armlinux$(echo .)org.uk \
--cc=Steen.Hegelund@microchip$(echo .)com \
--cc=UNGLinuxDriver@microchip$(echo .)com \
--cc=andrew@lunn$(echo .)ch \
--cc=daniel.machon@microchip$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=edumazet@google$(echo .)com \
--cc=f.fainelli@gmail$(echo .)com \
--cc=hkallweit1@gmail$(echo .)com \
--cc=horatiu.vultur@microchip$(echo .)com \
--cc=ioana.ciornei@nxp$(echo .)com \
--cc=kuba@kernel$(echo .)org \
--cc=lars.povlsen@microchip$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
--cc=madalin.bucur@nxp$(echo .)com \
--cc=michal.simek@amd$(echo .)com \
--cc=mw@semihalf$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=olteanv@gmail$(echo .)com \
--cc=pabeni@redhat$(echo .)com \
--cc=radhey.shyam.pandey@xilinx$(echo .)com \
--cc=sean.anderson@seco$(echo .)com \
--cc=taras.chornyi@plvision$(echo .)eu \
--cc=thomas.petazzoni@bootlin$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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