devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Russell King - ARM Linux admin <linux@armlinux.org.uk>
To: "Madalin Bucur (OSS)" <madalin.bucur@oss.nxp.com>
Cc: Andrew Lunn <andrew@lunn.ch>,
	"antoine.tenart@free-electrons.com" 
	<antoine.tenart@free-electrons.com>,
	"jaz@semihalf.com" <jaz@semihalf.com>,
	"baruch@tkos.co.il" <baruch@tkos.co.il>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"f.fainelli@gmail.com" <f.fainelli@gmail.com>,
	"hkallweit1@gmail.com" <hkallweit1@gmail.com>,
	"shawnguo@kernel.org" <shawnguo@kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: Re: [PATCH 1/6] net: phy: add interface modes for XFI, SFI
Date: Mon, 23 Dec 2019 08:26:57 +0000	[thread overview]
Message-ID: <20191223082657.GL25745@shell.armlinux.org.uk> (raw)
In-Reply-To: <VI1PR04MB556727A95090FFB4F9836DA2EC2E0@VI1PR04MB5567.eurprd04.prod.outlook.com>

On Mon, Dec 23, 2019 at 07:50:08AM +0000, Madalin Bucur (OSS) wrote:
> > -----Original Message-----
> > From: Andrew Lunn <andrew@lunn.ch>
> > Sent: Friday, December 20, 2019 12:06 PM
> > To: Madalin Bucur (OSS) <madalin.bucur@oss.nxp.com>
> > Cc: Russell King - ARM Linux admin <linux@armlinux.org.uk>;
> > antoine.tenart@free-electrons.com; jaz@semihalf.com; baruch@tkos.co.il;
> > davem@davemloft.net; netdev@vger.kernel.org; f.fainelli@gmail.com;
> > hkallweit1@gmail.com; shawnguo@kernel.org; devicetree@vger.kernel.org
> > Subject: Re: [PATCH 1/6] net: phy: add interface modes for XFI, SFI
> > 
> > On Fri, Dec 20, 2019 at 09:39:08AM +0000, Madalin Bucur (OSS) wrote:
> > > > -----Original Message-----
> > > > From: Andrew Lunn <andrew@lunn.ch>
> > > > Sent: Friday, December 20, 2019 11:29 AM
> > > > To: Russell King - ARM Linux admin <linux@armlinux.org.uk>
> > > > Cc: Madalin Bucur (OSS) <madalin.bucur@oss.nxp.com>;
> > antoine.tenart@free-
> > > > electrons.com; jaz@semihalf.com; baruch@tkos.co.il;
> > davem@davemloft.net;
> > > > netdev@vger.kernel.org; f.fainelli@gmail.com; hkallweit1@gmail.com;
> > > > shawnguo@kernel.org; devicetree@vger.kernel.org
> > > > Subject: Re: [PATCH 1/6] net: phy: add interface modes for XFI, SFI
> > > >
> > > > > How does this help us when we can't simply change the existing
> > usage?
> > > > > We can update the DT but we can't free up the usage of "10gbase-kr".
> > > >
> > > > Agreed. Code needs to keep on interpreting "10gbase-kr" as any 10G
> > > > link. If we ever have a true 10gbase-kr, 802.3ap, one meter of copper
> > > > and two connectors, we are going to have to add a new mode to
> > > > represent true 10gbase-kr.
> > > >
> > > > 	Andrew
> > >
> > > Hi, actually we do have that. What would be the name of the new mode
> > > representing true 10GBase-KR that we will need to add when we upstream
> > > support for that?
> > 
> > Ah!
> > 
> > This is going to be messy.
> > 
> > Do you really need to differentiate? What seems to make 802.3ap
> > different is the FEC, autoneg and link training. Does you hardware
> > support this? Do you need to know you are supposed to be using 802.3ap
> > in order to configure these features?
> 
> Yes, it does.
> 
> > What are we going to report to user space? 10gbase-kr, or
> > 10gbase-kr-true? How do we handle the mess this makes with firmware
> > based cards which correctly report
> > ETHTOOL_LINK_MODE_10000baseKR_Full_BIT to user space?
> > 
> > What do we currently report to user space? Is it possible for us to
> > split DT from user space? DT says 10gbase-kr-true but to user space we
> > say ETHTOOL_LINK_MODE_10000baseKR_Full_BIT?
> > 
> > I think in order to work through these issues, somebody probably needs
> > the hardware, and the desire to see it working. So it might actually
> > be you who makes a proposal how we sort this out, with help from
> > Russell and I.
> > 
> > 	Andrew
> 
> We're overcomplicating the fix. As far as I can see only some Marvell boards
> declared 10GBase-KR as PHY interface type. These either support 10GBase-KR or
> they don't. When we learn this, we'll need to set things straight in the device
> trees and code. Until then it will remain as is, there is no trouble with that.

No we aren't.

You think we can just change the existing DT, switching them to use
XFI/SFI and free up the "10gbase-kr" definition.  Yes, we can change
the existing DT.  What we *can't* do is free up the existing definition
for "10gbase-kr" because old device trees must continue to work with
new kernels.  That is one of the rules we abide by with the kernel.

Now, looking at the Armada 8040 data, it only mentions XFI.  It's
described as "10GBASE-R (10GbE on single SERDES, including XFI)"
and goes on to say that it is compliant with "IEEE 802.3 standard".
However, there is no mention of a CDR, except for XAUI/XSGS mode,
not for 10GBASE-R/XFI mode.

So, it really isn't clear whether Marvell uses "XFI" to refer to a
port with a CDR or not.

Marvell's original MVPP2.2 and comphy drivers did used to distinguish
between XFI and SFI, but there was absolutely no difference in the
way the hardware was programmed.

Then there's the matter that (I believe with some firmware) it can
also support 10GBASE-KR (with clause 73 AN) after all.

So, we can't just replace the existing usage in DT with "SFI" just
because it's connected to a SFP cage, or "XFI" if it's connected
to a PHY which also mentiones "XFI" in its datasheet. We can't tell
whether the hardware _actually_ supports 1EEE 10GBASE-R, XFI or SFI.

Given that XFI and SFI are not actually documented (afaics) this is
really not that surprising - and I would not be surprised if these
three terms were used interchangably by some device manufacturers
as a result.

-- 
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:[~2019-12-23  8:27 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-19 15:21 [PATCH 0/6] Add PHY connection types for XFI and SFI Madalin Bucur
2019-12-19 15:21 ` [PATCH 1/6] net: phy: add interface modes for XFI, SFI Madalin Bucur
2019-12-19 17:28   ` Russell King - ARM Linux admin
2019-12-19 18:32     ` Madalin Bucur
2019-12-19 19:03       ` Russell King - ARM Linux admin
2019-12-19 21:34         ` Madalin Bucur (OSS)
2019-12-19 21:49           ` Russell King - ARM Linux admin
2019-12-20  7:38             ` Madalin Bucur (OSS)
2019-12-20  9:16               ` Russell King - ARM Linux admin
2019-12-20  9:29                 ` Andrew Lunn
2019-12-20  9:39                   ` Madalin Bucur (OSS)
2019-12-20 10:06                     ` Andrew Lunn
2019-12-23  7:50                       ` Madalin Bucur (OSS)
2019-12-23  8:26                         ` Russell King - ARM Linux admin [this message]
2019-12-23  9:57                           ` Madalin Bucur (OSS)
2019-12-23 10:57                             ` Russell King - ARM Linux admin
2019-12-23 12:07       ` Russell King - ARM Linux admin
2019-12-23 13:46         ` Andrew Lunn
2019-12-23 14:30           ` Russell King - ARM Linux admin
2020-01-03  7:01         ` Madalin Bucur (OSS)
2020-01-03  9:27           ` Russell King - ARM Linux admin
2020-01-03  9:42             ` Russell King - ARM Linux admin
2020-01-03 12:03               ` Madalin Bucur (OSS)
2020-01-03 12:53                 ` Russell King - ARM Linux admin
2020-01-03 13:35                   ` Andrew Lunn
2020-01-03 16:21                     ` Madalin Bucur (OSS)
2020-01-03 17:17                       ` Andrew Lunn
2020-01-06  9:34                         ` Madalin Bucur (OSS)
2020-01-03 15:57                   ` Madalin Bucur (OSS)
2020-01-03 17:19                     ` Russell King - ARM Linux admin
2020-01-06 10:17                       ` Madalin Bucur (OSS)
2020-01-06 13:57                         ` Andrew Lunn
2020-01-06 15:03                           ` Madalin Bucur (OSS)
2019-12-19 15:21 ` [PATCH 2/6] arm64: dts: ls104xardb: set correct PHY interface mode Madalin Bucur
2019-12-19 16:05   ` Andrew Lunn
2019-12-19 18:09     ` Madalin Bucur (OSS)
2019-12-19 15:21 ` [PATCH 3/6] net: fsl/fman: rename IF_MODE_XGMII to IF_MODE_10G Madalin Bucur
2019-12-19 15:21 ` [PATCH 4/6] net: fsl/fman: add support for PHY_INTERFACE_MODE_XFI Madalin Bucur
2019-12-19 15:21 ` [PATCH 5/6] net: fsl/fman: add support for PHY_INTERFACE_MODE_SFI Madalin Bucur
2019-12-19 17:30   ` Russell King - ARM Linux admin
2019-12-19 18:50     ` Madalin Bucur (OSS)
2019-12-19 15:21 ` [PATCH 6/6] net: phy: aquantia: add support for PHY_INTERFACE_MODE_XFI Madalin Bucur

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=20191223082657.GL25745@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=andrew@lunn.ch \
    --cc=antoine.tenart@free-electrons.com \
    --cc=baruch@tkos.co.il \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=jaz@semihalf.com \
    --cc=madalin.bucur@oss.nxp.com \
    --cc=netdev@vger.kernel.org \
    --cc=shawnguo@kernel.org \
    /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).