From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Andrew Lunn <andrew@lunn.ch>, Heiner Kallweit <hkallweit1@gmail.com>
Cc: Eric Woudstra <ericwouds@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org
Subject: Re: [PATCH RFC net-next] net: phylink: always do a major config when attaching a SFP PHY
Date: Wed, 15 Jan 2025 23:19:39 +0000 [thread overview]
Message-ID: <Z4hCiwfLL2q2rIMM@shell.armlinux.org.uk> (raw)
In-Reply-To: <E1tXhIJ-000me6-SA@rmk-PC.armlinux.org.uk>
Hi Eric,
I'd like to get a tested-by from you before sending this for merging,
as this should fix your reported issue.
Thanks.
On Tue, Jan 14, 2025 at 01:49:23PM +0000, Russell King (Oracle) wrote:
> Background: https://lore.kernel.org/r/20250107123615.161095-1-ericwouds@gmail.com
>
> Since adding negotiation of in-band capabilities, it is no longer
> sufficient to just look at the MLO_AN_xxx mode and PHY interface to
> decide whether to do a major configuration, since the result now
> depends on the capabilities of the attaching PHY.
>
> Always trigger a major configuration in this case.
>
> Reported-by: Eric Woudstra <ericwouds@gmail.com>
> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
> ---
> This follows on from https://lore.kernel.org/r/Z4TbR93B-X8A8iHe@shell.armlinux.org.uk "net: phylink: fix PCS without autoneg"
>
> drivers/net/phy/phylink.c | 11 +++++------
> 1 file changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c
> index ff0efb52189f..7d64182cf802 100644
> --- a/drivers/net/phy/phylink.c
> +++ b/drivers/net/phy/phylink.c
> @@ -3412,12 +3412,11 @@ static phy_interface_t phylink_choose_sfp_interface(struct phylink *pl,
> return interface;
> }
>
> -static void phylink_sfp_set_config(struct phylink *pl,
> - unsigned long *supported,
> - struct phylink_link_state *state)
> +static void phylink_sfp_set_config(struct phylink *pl, unsigned long *supported,
> + struct phylink_link_state *state,
> + bool changed)
> {
> u8 mode = MLO_AN_INBAND;
> - bool changed = false;
>
> phylink_dbg(pl, "requesting link mode %s/%s with support %*pb\n",
> phylink_an_mode_str(mode), phy_modes(state->interface),
> @@ -3494,7 +3493,7 @@ static int phylink_sfp_config_phy(struct phylink *pl, struct phy_device *phy)
>
> pl->link_port = pl->sfp_port;
>
> - phylink_sfp_set_config(pl, support, &config);
> + phylink_sfp_set_config(pl, support, &config, true);
>
> return 0;
> }
> @@ -3569,7 +3568,7 @@ static int phylink_sfp_config_optical(struct phylink *pl)
>
> pl->link_port = pl->sfp_port;
>
> - phylink_sfp_set_config(pl, pl->sfp_support, &config);
> + phylink_sfp_set_config(pl, pl->sfp_support, &config, false);
>
> return 0;
> }
> --
> 2.30.2
>
>
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
next prev parent reply other threads:[~2025-01-15 23:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-14 13:49 [PATCH RFC net-next] net: phylink: always do a major config when attaching a SFP PHY Russell King (Oracle)
2025-01-15 23:19 ` Russell King (Oracle) [this message]
2025-01-16 18:46 ` Eric Woudstra
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=Z4hCiwfLL2q2rIMM@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=ericwouds@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.