From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Andrew Lunn <andrew@lunn.ch>
Cc: AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
Daniel Machon <daniel.machon@microchip.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>, Felix Fietkau <nbd@nbd.name>,
Florian Fainelli <f.fainelli@gmail.com>,
Heiner Kallweit <hkallweit1@gmail.com>,
Horatiu Vultur <horatiu.vultur@microchip.com>,
Ioana Ciornei <ioana.ciornei@nxp.com>,
Jakub Kicinski <kuba@kernel.org>, John Crispin <john@phrozen.org>,
Jose Abreu <Jose.Abreu@synopsys.com>,
Lars Povlsen <lars.povlsen@microchip.com>,
Lorenzo Bianconi <lorenzo@kernel.org>,
Marcin Wojtas <mw@semihalf.com>,
Mark Lee <Mark-MC.Lee@mediatek.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
Maxime Chevallier <maxime.chevallier@bootlin.com>,
Paolo Abeni <pabeni@redhat.com>,
Sean Wang <sean.wang@mediatek.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>,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, netdev@vger.kernel.org
Subject: Re: [PATCH RFC] Providing a helper for PCS inband negotiation
Date: Mon, 15 May 2023 16:34:33 +0100 [thread overview]
Message-ID: <ZGJRCaR2gQqEt2+L@shell.armlinux.org.uk> (raw)
In-Reply-To: <9f7b1d6f-ca62-4c6c-9cd5-37726e7857b7@lunn.ch>
On Mon, May 15, 2023 at 03:58:09PM +0200, Andrew Lunn wrote:
> > 2. XLGMII.. Looking at the XPCS driver, it's unclear whether Clause 73
> > AN gets used for this. A quick scan of IEEE 802.3 suggests that
> > XLGMII doesn't have any support for any inband signalling, and it's
> > just an intermediary protocol between the MAC (more specifically the
> > RS, but for the purposes of this I'll just refer to MAC) and the
> > attached PCS, and any autonegotiation happens after the XLGMII link.
>
> So isn't XLGMII then a generic PHY thing, not a phylink thing?
Honestly, I'm really not sure. It feels more like an internal-SoC
thing. See my last diagram why I think this.
> Or am i not correctly understanding how
> drivers/phy/marvell/phy-*-comphy.c and
> drivers/phy/microchip/*_serdev.c fit into the overall picture?
In the case of serdes-based protocols with an external PHY, the general
structure we have is:
------------------------------+
SoC |
+-----+ +-----+ +--------+ | +--------------+
| MAC +---+ PCS +--+ SERDES +------------+ Ethernet PHY +---- Media
+-----+ +-----+ +--------+ | ^ +--------------+
------------------------------+ |
|
PHY_INTERFACE_MODE_xxx has referred to this bit, and this is the bit
where inband can occur.
In the case of multi-rate implementations, there can be one of many
different PCS that can be placed there, and the SERDES handles
converting the data stream from the PCS into its appropriate
electrical form, essentially covering the PMA and PMD functions.
(That same SERDES block generally can also handle PCIe and SATA.)
In the case of non-serdes based protocols, then it's essentially the
same as the above, but with the PCS and SERDES blocks removed.
For Fibre based connections:
------------------------------+
SoC |
+-----+ +-----+ +--------+ |
| MAC +---+ PCS +--+ SERDES +------------ Media
+-----+ +-----+ +--------+ | ^
------------------------------+ |
|
PHY_INTERFACE_MODE_xxx has referred to this bit, and 1000BASE-X runs
negotiation on this. 10GBASE-R also used for fibre has no negotiation,
but there's still the 10GBASE-R PCS and the 802.3 PMA/PMD are subsumed
by the SERDES block.
What I think seems to be the case with XPCS is:
------------------------------+
SoC |
+-----+ +-----+ +--------+ |
| MAC +---+ PCS +--+ SERDES +----------- Media
+-----+ ^ +-----+ +--------+ |
--------|---------------------+
|
PHY_INTERFACE_MODE_xxx seems to be referring to this bit. When clause 73
negotiation is used, that happens where I've stated "media" above, and
that's involved with negotiating backplane protocols e.g. 40GBASE-KR4,
40GBASE-CR4, 25GBASE-KR, 10GBASE-KR, 1000BASE-KX etc on the bit I've
called "Media" above.
However, we can also have this for a fibre link:
------------------------------+
SoC |
+-----+ +-----+ +--------+ |
| MAC +---+ PCS +--+ SERDES +----------- Fibre
+-----+ ^ +-----+ +--------+ | ^
--------|---------------------+ |
| |
XLGMII 40GBASE-R
Given that in this case, we'd want PHY_INTERFACE_MODE_xxx to say
40GBASE-R, using the existing PHY_INTERFACE_MODE_xxx to specify at
where I've pointed XLGMII just makes things confused... but in the
case above with clause 73 negotiation, we wouldn't have a standard
PHY_INTERFACE_MODE_xxx specifier for the external "media" side
because that's dependent on the result of the negotiation.
So... this seems to be a right can of wriggly things.
--
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:[~2023-05-15 15:35 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-15 12:22 [PATCH RFC] Providing a helper for PCS inband negotiation Russell King (Oracle)
2023-05-15 13:58 ` Andrew Lunn
2023-05-15 15:34 ` Russell King (Oracle) [this message]
2023-05-15 15:44 ` Russell King (Oracle)
2023-05-15 19:56 ` Vladimir Oltean
2023-05-15 21:45 ` Russell King (Oracle)
2023-05-15 22:08 ` Vladimir Oltean
2023-05-15 23:36 ` Russell King (Oracle)
2023-05-16 9:00 ` Vladimir Oltean
2023-05-16 11:49 ` Russell King (Oracle)
2023-05-16 14:15 ` Vladimir Oltean
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=ZGJRCaR2gQqEt2+L@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=Jose.Abreu@synopsys.com \
--cc=Mark-MC.Lee@mediatek.com \
--cc=Steen.Hegelund@microchip.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=andrew@lunn.ch \
--cc=angelogioacchino.delregno@collabora.com \
--cc=daniel.machon@microchip.com \
--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=john@phrozen.org \
--cc=kuba@kernel.org \
--cc=lars.povlsen@microchip.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=lorenzo@kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=maxime.chevallier@bootlin.com \
--cc=mw@semihalf.com \
--cc=nbd@nbd.name \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=sean.wang@mediatek.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;
as well as URLs for NNTP newsgroup(s).