Re: [RFC net-next] net: phy: Add basic support for Synopsys XPCS using a PHY driver

From: Russell King - ARM Linux admin
Date: Mon Jan 13 2020 - 09:18:31 EST


On Mon, Jan 13, 2020 at 01:54:28PM +0000, Jose Abreu wrote:
> From: Andrew Lunn <andrew@xxxxxxx>
> Date: Jan/13/2020, 13:38:45 (UTC+00:00)
>
> > On Mon, Jan 13, 2020 at 02:11:08PM +0100, Jose Abreu wrote:
> > > Adds the basic support for XPCS including support for USXGMII.
> >
> > Hi Jose
> >
> > Please could you describe the 'big picture'. What comes after the
> > XPCS? An SFP? A copper PHY? How in Linux do you combine this PHY and
> > whatever comes next using PHYLINK?
> >
> > Or do only support backplane with this, and the next thing in the line
> > is the peers XPCS?
>
> My current setup is this:
>
> Host PC x86 -> PCI -> XGMAC -> XPCS -> SERDES 10G-BASE-R -> QSFP+
>
> The only piece that needs configuration besides XGMAC is the XPCS hereby
> I "called" it a PHY ... Anyway, this is an RFC because I'm not entirely
> sure about the approach. Hmm ?

I don't seem to have been copied on the original mail, so I'm jumping
in blind here.

In phylink, the mac_pcs_get_state() method is supposed to read from
the PCS - in your case, the XPCS. This wasn't obvious when phylink
was first submitted, especially as mvneta and mvpp2 don't offer
802.3 MDIO compliant PCS interfaces. Hence the recent change in
naming of that method.

I've recently suggested a patch to phylink to add a generic helper to
read the state from a generic 802.3 clause 37 PCS, but I guess that
won't be sufficient for an XPCS. However, it should give some clues
if you're intending to use phylink.

--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up