archive mirror
 help / color / mirror / Atom feed
From: Russell King - ARM Linux admin <>
To: Michael Walle <>
Cc: Vladimir Oltean <>,
	"David S. Miller" <>,
	Jakub Kicinski <>,
	Antoine Tenart <>,
	Quentin Schulz <>,, Heiner Kallweit <>,
	Andrew Lunn <>,
	Florian Fainelli <>,
	Ioana Ciornei <>,
	Maxim Kochetkov <>,
	Bjarni Jonasson <>,
	Steen Hegelund <>,
Subject: Re: [PATCH net-next 1/2] net: phylink: explicitly configure in-band autoneg for PHYs that support it
Date: Sat, 13 Feb 2021 17:06:46 +0000	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On Sat, Feb 13, 2021 at 05:41:55PM +0100, Michael Walle wrote:
> Am 2021-02-13 01:18, schrieb Russell King - ARM Linux admin:
> > That is a function of the interface mode and the PHY capabilities.
> > 
> > 1) if the PHY supports rate adaption, and is programmed for that, then
> >    the PHY link normally operates at a fixed speed (e.g. 1G for SGMII)
> >    and the PHY converts to the appropriate speed.
> > 
> >    We don't actually support this per se, since the parameters we give
> >    to the MAC via mac_link_up() are the media side parameters, not the
> >    link parameters.
> > 
> > 2) if the PHY does not support rate adaption, then the MAC to PHY link
> >    needs to follow the media speed and duplex. phylink will be in "PHY"
> >    mode, where it passes the media side negotiation results to the MAC
> >    just like phylib would, and the MAC should be programmed
> >    appropriately. In the case of a SGMII link, the link needs to be
> >    programmed to do the appropriate symbol repetition for 100M and 10M
> >    speeds. The PHY /should/ do that automatically, but if it doesn't,
> >    then the PHY also needs to be programmed to conform. (since if
> >    there's no rate adaption in the PHY, the MAC side and the media side
> >    must match.)
> Thanks, but I'm not sure I understand the difference between "rate
> adaption" and symbol repetition. The SGMII link is always 1.25Gb,
> right? If the media side is 100Mbit it will repeat the symbol 10
> times or 100 times in case of 10Mbit. What is "rate adaption" then?

You are correct about SGMII.

Bear in mind that there is very little difference between SGMII and
1000base-X when you don't have AN. SGMII can be forced to do the
symbol repetition.  Symbol repetition does not exist in 1000base-X.

Some PHYs, particularly 10G multi-speed PHYs, have a "rate adaption"
block that can be used when the media side is operating at slower-
than-10G speed when the media side is fixed at 10G. What this means
is the MAC side always operates at full 10G speed, but the PHY
queues packets for transmission at the media rate. Received packets
are received by the PHY and then forwarded to the MAC at 10G speed.

To add to that, some PHYs have the ability to send pause frames
when their internal buffer fills up. Others stipulate that the MAC
needs to rate-limit the transmitted packets to match the media side

Whether such a feature exists in 1G PHYs is unknown. If a PHY is
capable of 1G/100M/10M speeds, but if SGMII AN is disabled and
there is no way to force the symbol repetition, the SGMII side
will be fixed at 1G speed. The only way this can work with a
slower media speed is if the PHY performs rate adaption internally,
converting between the 1G speed on the host side and whatever speed
the media side is operating.

So, for example, if the PHY was to have rate adaption, the media
side would operate at 100M but the MAC side would continue operating
at 1G speed without symbol repetition.

RMK's Patch system:
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

  parent reply	other threads:[~2021-02-13 17:10 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-12 17:23 [PATCH net-next 0/2] Let phylink manage in-band AN for the PHY Vladimir Oltean
2021-02-12 17:23 ` [PATCH net-next 1/2] net: phylink: explicitly configure in-band autoneg for PHYs that support it Vladimir Oltean
2021-02-12 22:40   ` Michael Walle
2021-02-13  0:18     ` Russell King - ARM Linux admin
2021-02-13 16:41       ` Michael Walle
2021-02-13 16:59         ` Andrew Lunn
2021-02-13 17:06         ` Russell King - ARM Linux admin [this message]
2021-02-13  0:36     ` Vladimir Oltean
2021-02-13 16:53       ` Michael Walle
2021-02-13 17:09         ` Michael Walle
2021-02-13 18:56           ` Vladimir Oltean
2021-02-13 19:57             ` Michael Walle
2021-02-13 20:12               ` Vladimir Oltean
2021-02-13 20:16               ` Russell King - ARM Linux admin
2021-02-14 10:35   ` Russell King - ARM Linux admin
2021-02-14 11:10     ` Vladimir Oltean
2021-02-14 13:18       ` Russell King - ARM Linux admin
2021-02-12 17:23 ` [PATCH net-next 2/2] net: phy: mscc: configure in-band auto-negotiation for VSC8514 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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
    --subject='Re: [PATCH net-next 1/2] net: phylink: explicitly configure in-band autoneg for PHYs that support it' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).