netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Russell King - ARM Linux admin <linux@armlinux.org.uk>
To: Vladimir Oltean <olteanv@gmail.com>
Cc: Jose Abreu <Jose.Abreu@synopsys.com>,
	Andrew Lunn <andrew@lunn.ch>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Joao Pinto <Joao.Pinto@synopsys.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [RFC net-next] net: phy: Add basic support for Synopsys XPCS using a PHY driver
Date: Mon, 13 Jan 2020 15:09:46 +0000	[thread overview]
Message-ID: <20200113150946.GO25745@shell.armlinux.org.uk> (raw)
In-Reply-To: <CA+h21hqYeq_D5hLi8yssNko6ucNSVCFMQxqkvGcGxL86niu7pA@mail.gmail.com>

On Mon, Jan 13, 2020 at 04:50:18PM +0200, Vladimir Oltean wrote:
> Hi Russell,
> 
> On Mon, 13 Jan 2020 at 16:19, Russell King - ARM Linux admin
> <linux@armlinux.org.uk> wrote:
> >
> > 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.
> >
> 
> I don't think the PCS implementations out there are sufficiently
> similar to be driven by a unified driver, and at least nothing
> mandates that for now. Although the configuration interface is MDIO
> with registers quasi-compliant to C22 or C45, many times bits in
> BMCR/BMSR are not implemented, you can't typically achieve full
> functionality [ sometimes not at all ] without writing to some
> vendor-specific registers, there might be errata workarounds that need
> to be implemented through PCS writes, often the PCS driver needs to be
> correlated with a MMIO region corresponding to that SerDes lane for
> stuff such as eye parameters.
> The code duplication isn't even all that bad.

That's opinion.

The PCS register set is defined in 802.3, and there are at least two
implementations I've come across that are compliant. I suspect there
are many more that are also compliant out there.

> _But_ I am not sure how PHYLINK comes into play here. A PHY driver
> should work with the plain PHY library too. Dealing with clause 73
> autoneg indicates to me that this is more than just a MAC PCS,
> therefore it shouldn't be tied in with PHYLINK.

I think you're looking at this wrong, or you have a misunderstanding
of where phylink sits in this.

phylink is there to help deal with SFPs, and to manage the MAC side
of the link which *includes* the MAC PCS, and interface that to
either a PHY or a SFP.  phylink has always assumed right from day
one that it will be talking to the MAC _and_ MAC PCS.

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

  reply	other threads:[~2020-01-13 15:10 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-13 13:11 [RFC net-next] net: phy: Add basic support for Synopsys XPCS using a PHY driver Jose Abreu
2020-01-13 13:38 ` Andrew Lunn
2020-01-13 13:54   ` Jose Abreu
2020-01-13 14:18     ` Russell King - ARM Linux admin
2020-01-13 14:27       ` Jose Abreu
2020-01-13 14:55         ` Vladimir Oltean
2020-01-13 15:05           ` Jose Abreu
2020-01-13 14:50       ` Vladimir Oltean
2020-01-13 15:09         ` Russell King - ARM Linux admin [this message]
2020-01-20 10:31       ` Jose Abreu
2020-01-20 10:50         ` Russell King - ARM Linux admin
2020-01-20 11:07           ` Jose Abreu
2020-01-20 11:39             ` Russell King - ARM Linux admin
     [not found]               ` <e942b414-08bd-0305-9128-26666a7a5d5a@linux.intel.com>
2020-02-04  9:41                 ` Chng, Jack Ping
2020-03-09  9:22                   ` Jose Abreu
2020-01-13 13:42 ` [RFC " Andy Shevchenko
2020-01-13 14:07   ` Jose Abreu

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=20200113150946.GO25745@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=Joao.Pinto@synopsys.com \
    --cc=Jose.Abreu@synopsys.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.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).