[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b8a7138d-7e7c-49df-b9b5-9e39f02d0aaa@lunn.ch>
Date: Mon, 7 Apr 2025 21:34:25 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Alexander Duyck <alexander.duyck@...il.com>
Cc: Jakub Kicinski <kuba@...nel.org>,
"Russell King (Oracle)" <linux@...linux.org.uk>,
Maxime Chevallier <maxime.chevallier@...tlin.com>,
netdev@...r.kernel.org, hkallweit1@...il.com, davem@...emloft.net,
pabeni@...hat.com
Subject: Re: [net PATCH 1/2] net: phy: Cleanup handling of recent changes to
phy_lookup_setting
> Arguably understanding this code, both phylink and our own MAC/PCS/PMD
> code, has been a real grind but I think I am getting there. If I am
> not mistaken the argument is that we aren't "fixed-link" as we have
> control over what the PCS/PMA configuration is. We are essentially
> managing things top down, whereas the expectation for "fixed-link" is
> more of a bottom up.
Fixed link is there to emulate something which does not
exist. Typically you have a MAC connected to a PHY, or a MAC connected
to an SFP. The PHY or the SFP tell you how to configure the MAC so the
chain MAC/PHY/Media works.
However, there are use cases where you connect one MAC directly to
another MAC. E.G you connect a NIC MAC to the MAC port of a switch.
Fixed link allows you to emulate the missing PHY, so that the MAC has
no idea the PHY is missing. The end result is that the MAC gets
configured to make the MAC-MAC link work, without the MAC even knowing
it is connected to another MAC.
When talking about top down vs bottom up, i think you mean MAC towards
the media, vs media towards the MAC. Because of Base-T autoneg, etc,
phylink configures stuff upwards from the media. It needs to wait for
the PHY to determine what the media is going to do. The PHY will then
decided what its host side needs, SGMII, 2500BaseX, 10Gbase etc. That
then allows phylink to configure the PCS to output that. And then you
need to configure the MAC to feed the PCSs at the correct speed. I
don't think SFPs are so different. The SFP will probably indicate what
its maximum bandwidth is. You configure that in the PCS and let is
negotiate with the link partner PCS to determine the speed, pause
etc. You can then configure the MAC with the results of that
negotiation.
So fixed-link is not really bottom up, the whole configuration chain
is media towards the MAC, and it makes no difference if the PHY is
being emulated via a fixed-link because it does not exist.
Andrew
Powered by blists - more mailing lists