From: Alexander Wilhelm <alexander.wilhelm@westermo.com>
To: Vladimir Oltean <vladimir.oltean@nxp.com>
Cc: "Russell King (Oracle)" <linux@armlinux.org.uk>,
Andrew Lunn <andrew@lunn.ch>,
Heiner Kallweit <hkallweit1@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, linux-kernel@vger.kernel.org
Subject: Re: Aquantia PHY in OCSGMII mode?
Date: Thu, 2 Oct 2025 07:54:48 +0200 [thread overview]
Message-ID: <aN4TqGD-YBx01vlj@FUE-ALEWI-WINX> (raw)
In-Reply-To: <20250828092859.vvejz6xrarisbl2w@skbuf>
On Thu, Aug 28, 2025 at 12:28:59PM +0300, Vladimir Oltean wrote:
> On Wed, Aug 27, 2025 at 10:13:59AM +0100, Russell King (Oracle) wrote:
> > On Wed, Aug 27, 2025 at 11:03:42AM +0200, Alexander Wilhelm wrote:
> > > I asked the hardware engineer again. The point is that the MAC does not set
> > > SGMII for 100M. It still uses 2500base-x but with 10x paket repetition.
> >
> > No one uses symbol repetition when in 2500base-x mode. Nothing supports
> > it. Every device datasheet I've read states clearly that symbol
> > repetition is unsupported when operating at 2.5Gbps.
> >
> > Also think about what this means. If the link is operating at 2.5Gbps
> > with a 10x symbol repetition, that means the link would be passing
> > 250Mbps. That's not compatible with _anything_.
>
> FWIW, claim 5 of this active Cisco patent suggests dividing frames into
> 2 segments, replicating symbols from the first segment twice and symbols
> from the second segment three times.
> https://urldefense.com/v3/__https://patents.google.com/patent/US7356047B1/en__;!!I9LPvj3b!Fx2G5geAtgbXRIF2G5-FXZ1uR8K3DzHG9gwbOA0N3YRTEz4_c9Mx58Ejphl6RPuN5KXYHzAKyvPHyYnKNl1oJiY2aFmSNbRZ$
>
> I'm completely unaware of any implementations of this either, though.
>
> To remain on topic, I don't see how the hardware engineer's claim can be
> true. The PCS symbol replication is done through the IF_MODE_SPEED
> field, which lynx_pcs_link_up_2500basex() sets to SGMII_SPEED_2500 (same
> as SGMII_SPEED_1000, i.e. no replication). You can confirm that the
> IF_MODE register has the expected value by putting a print.
Hi Vladimir,
Thanks your for the hint with the IF_MODE register, I finally found the
root cause of my issue. Unfortunately, my U-Boot implementation was setting
the `IF_MODE_SGMII_EN` and `IF_MODE_USE_SGMII_AN` bits. This caused a 10x
symbol replication when operating at 100M speed. At the same time, the
`pcs-lynx` driver never modified these bits when 2500Base-X was configured.
I was able to fix this in U-Boot. Additionally, I explicitly cleared these
bits in the Lynx driver whenever 2500Base-X is configured (see patch
below). I’d like to hear your expertise on this: do you think this patch is
necessary, or could there be scenarios where these flags should remain set
for 2500Base-X?
Best regards
Alexander Wilhelm
---
drivers/net/pcs/pcs-lynx.c | 26 ++++++++++++++++++++------
1 file changed, 20 insertions(+), 6 deletions(-)
diff --git a/drivers/net/pcs/pcs-lynx.c b/drivers/net/pcs/pcs-lynx.c
index 23b40e9eacbb..2774c62fb0db 100644
--- a/drivers/net/pcs/pcs-lynx.c
+++ b/drivers/net/pcs/pcs-lynx.c
@@ -169,6 +169,25 @@ static int lynx_pcs_config_giga(struct mdio_device *pcs,
neg_mode);
}
+static int lynx_pcs_config_2500basex(struct mdio_device *pcs,
+ unsigned int neg_mode)
+{
+ int err;
+
+ if (neg_mode == PHYLINK_PCS_NEG_INBAND_ENABLED) {
+ dev_err(&pcs->dev,
+ "AN not supported on 3.125GHz SerDes lane\n");
+ return -EOPNOTSUPP;
+ }
+
+ err = mdiodev_modify(pcs, IF_MODE,
+ IF_MODE_SGMII_EN | IF_MODE_USE_SGMII_AN, 0);
+ if (err)
+ return err;
+
+ return 0;
+}
+
static int lynx_pcs_config_usxgmii(struct mdio_device *pcs,
const unsigned long *advertising,
unsigned int neg_mode)
@@ -201,12 +220,7 @@ static int lynx_pcs_config(struct phylink_pcs *pcs, unsigned int neg_mode,
return lynx_pcs_config_giga(lynx->mdio, ifmode, advertising,
neg_mode);
case PHY_INTERFACE_MODE_2500BASEX:
- if (neg_mode == PHYLINK_PCS_NEG_INBAND_ENABLED) {
- dev_err(&lynx->mdio->dev,
- "AN not supported on 3.125GHz SerDes lane\n");
- return -EOPNOTSUPP;
- }
- break;
+ return lynx_pcs_config_2500basex(lynx->mdio, neg_mode);
case PHY_INTERFACE_MODE_USXGMII:
return lynx_pcs_config_usxgmii(lynx->mdio, advertising,
neg_mode);
base-commit: 8f5ae30d69d7543eee0d70083daf4de8fe15d585
--
2.43.0
next prev parent reply other threads:[~2025-10-02 6:03 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-31 14:59 Aquantia PHY in OCSGMII mode? Alexander Wilhelm
2025-07-31 15:14 ` Andrew Lunn
2025-07-31 16:02 ` Russell King (Oracle)
2025-08-01 5:44 ` Alexander Wilhelm
2025-08-04 14:53 ` Andrew Lunn
2025-07-31 17:16 ` Vladimir Oltean
2025-07-31 19:26 ` Russell King (Oracle)
2025-08-01 5:50 ` Alexander Wilhelm
2025-08-01 11:01 ` Vladimir Oltean
2025-08-01 11:54 ` Alexander Wilhelm
2025-08-01 11:58 ` Russell King (Oracle)
2025-08-01 12:06 ` Alexander Wilhelm
2025-08-01 12:23 ` Russell King (Oracle)
2025-08-01 12:36 ` Alexander Wilhelm
2025-08-01 13:04 ` Vladimir Oltean
2025-08-01 14:02 ` Russell King (Oracle)
2025-08-01 14:37 ` Vladimir Oltean
2025-08-04 6:17 ` Alexander Wilhelm
2025-08-04 10:01 ` Vladimir Oltean
2025-08-04 13:01 ` Alexander Wilhelm
2025-08-04 13:41 ` Vladimir Oltean
2025-08-04 14:47 ` Alexander Wilhelm
2025-08-04 16:00 ` Vladimir Oltean
2025-08-04 16:02 ` Vladimir Oltean
2025-08-05 7:59 ` Alexander Wilhelm
2025-08-05 10:20 ` Vladimir Oltean
2025-08-05 12:44 ` Alexander Wilhelm
2025-08-06 14:58 ` Vladimir Oltean
2025-08-07 5:56 ` Alexander Wilhelm
2025-08-27 5:57 ` Alexander Wilhelm
2025-08-27 7:31 ` Vladimir Oltean
2025-08-27 8:41 ` Alexander Wilhelm
2025-08-27 8:47 ` Russell King (Oracle)
2025-08-27 9:03 ` Alexander Wilhelm
2025-08-27 9:13 ` Russell King (Oracle)
2025-08-28 9:28 ` Vladimir Oltean
2025-10-02 5:54 ` Alexander Wilhelm [this message]
2025-10-07 14:08 ` Vladimir Oltean
2025-10-08 7:47 ` Alexander Wilhelm
2025-10-08 11:10 ` Vladimir Oltean
2025-10-08 12:52 ` Russell King (Oracle)
2025-10-08 13:00 ` Vladimir Oltean
2025-10-08 13:28 ` Alexander Wilhelm
2025-10-08 14:55 ` Vladimir Oltean
2025-10-09 6:05 ` Alexander Wilhelm
2025-08-27 8:08 ` Russell King (Oracle)
2025-08-27 8:32 ` Alexander Wilhelm
2025-08-27 8:45 ` Russell King (Oracle)
2025-08-04 14:22 ` Russell King (Oracle)
2025-08-04 14:51 ` Alexander Wilhelm
2025-08-04 14:56 ` Vladimir Oltean
2025-08-01 11:13 ` Vladimir Oltean
2025-08-01 5:53 ` Alexander Wilhelm
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=aN4TqGD-YBx01vlj@FUE-ALEWI-WINX \
--to=alexander.wilhelm@westermo.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=vladimir.oltean@nxp.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