From: Daniel Machon <daniel.machon@microchip.com>
To: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
Cc: Andrew Lunn <andrew@lunn.ch>,
Heiner Kallweit <hkallweit1@gmail.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: Re: [PATCH RFC net-next 9/9] net: sparx5: switch PCS driver to use phylink_pcs_neg_mode()
Date: Tue, 30 May 2023 12:49:39 +0000 [thread overview]
Message-ID: <ZHXw4/JCPIMShHgH@DEN-LT-70577> (raw)
In-Reply-To: <E1q1UMY-007FTP-SG@rmk-PC.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/microchip/sparx5/sparx5_phylink.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_phylink.c b/drivers/net/ethernet/microchip/sparx5/sparx5_phylink.c
> index bb97d27a1da4..87bdec185383 100644
> --- a/drivers/net/ethernet/microchip/sparx5/sparx5_phylink.c
> +++ b/drivers/net/ethernet/microchip/sparx5/sparx5_phylink.c
> @@ -99,13 +99,17 @@ static int sparx5_pcs_config(struct phylink_pcs *pcs,
> {
> struct sparx5_port *port = sparx5_pcs_to_port(pcs);
> struct sparx5_port_config conf;
> + unsigned int neg_mode;
> int ret = 0;
>
> + neg_mode = phylink_pcs_neg_mode(mode, interface, advertising);
> +
> conf = port->conf;
> conf.power_down = false;
> conf.portmode = interface;
> - conf.inband = phylink_autoneg_inband(mode);
> - conf.autoneg = phylink_test(advertising, Autoneg);
> + conf.inband = neg_mode == PHYLINK_PCS_NEG_INBAND_DISABLED ||
> + neg_mode == PHYLINK_PCS_NEG_INBAND_ENABLED;
> + conf.autoneg = neg_mode == PHYLINK_PCS_NEG_INBAND_ENABLED;
> conf.pause_adv = 0;
> if (phylink_test(advertising, Pause))
> conf.pause_adv |= ADVERTISE_1000XPAUSE;
> --
> 2.30.2
>
>
Hi Russel,
This looks good to me. Tested on sparx5 pcb134 and pcb135.
/Daniel
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-05-30 12:50 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 ` [PATCH RFC net-next 5/9] net: mvneta: " Russell King (Oracle)
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 [this message]
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=ZHXw4/JCPIMShHgH@DEN-LT-70577 \
--to=daniel.machon@microchip.com \
--cc=Steen.Hegelund@microchip.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=horatiu.vultur@microchip.com \
--cc=ioana.ciornei@nxp.com \
--cc=kuba@kernel.org \
--cc=lars.povlsen@microchip.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=madalin.bucur@nxp.com \
--cc=michal.simek@amd.com \
--cc=mw@semihalf.com \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=radhey.shyam.pandey@xilinx.com \
--cc=rmk+kernel@armlinux.org.uk \
--cc=sean.anderson@seco.com \
--cc=taras.chornyi@plvision.eu \
--cc=thomas.petazzoni@bootlin.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