All of lore.kernel.org
 help / color / mirror / Atom feed
From: Russell King - ARM Linux admin <linux@armlinux.org.uk>
To: Robert Hancock <hancock@sedsystems.ca>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net-next] net: phy: phylink: add fallback from SGMII to 1000BaseX
Date: Fri, 7 Jun 2019 19:34:36 +0100	[thread overview]
Message-ID: <20190607183436.af6h5lhw7nb3ycet@shell.armlinux.org.uk> (raw)
In-Reply-To: <37914305-fd19-949a-e20e-b709495c517d@sedsystems.ca>

On Fri, Jun 07, 2019 at 12:10:57PM -0600, Robert Hancock wrote:
> On 2019-06-02 9:15 a.m., Russell King - ARM Linux admin wrote:
> > On Fri, May 31, 2019 at 06:17:51PM -0600, Robert Hancock wrote:
> >> Our device is mainly intended for fiber modules, which is why 1000BaseX
> >> is being used. The variant of fiber modules we are using (for example,
> >> Finisar FCLF8520P2BTL) are set up for 1000BaseX, and seem like they are
> >> kind of a hack to allow using copper on devices which only support
> >> 1000BaseX mode (in fact that particular one is extra hacky since you
> >> have to disable 1000BaseX autonegotiation on the host side). This patch
> >> is basically intended to allow that particular case to work.
> > 
> > Looking at the data sheet for FCLF8520P2BTL, it explicit states:
> > 
> > PRODUCT SELECTION
> > Part Number	Link Indicator	1000BASE-X auto-negotiation
> > 		on RX_LOS Pin	enabled by default
> > FCLF8520P2BTL	Yes		No
> > FCLF8521P2BTL	No		Yes
> > FCLF8522P2BTL	Yes		Yes
> > 
> > The idea being, you buy the correct one according to what the host
> > equipment requires, rather than just picking one and hoping it works.
> > 
> > The data sheet goes on to mention that the module uses a Marvell
> > 88e1111 PHY, which seems to be quite common for copper SFPs from
> > multiple manufacturers (but not all) and is very flexible in how it
> > can be configured.
> > 
> > If we detect a PHY on the SFP module, we check detect whether it is
> > an 88e1111 PHY, and then read out its configured link type.  We don't
> > have a way to deal with the difference between FCLF8520P2BTL and
> > FCLF8521P2BTL, but at least we'll be able to tell whether we should
> > be in 1000Base-X mode for these modules, rather than SGMII.
> 
> It looks like that might provide a solution for modules using the
> Marvell PHY, however some of the modules we are supporting seem to use a
> Broadcom PHY, and I have no idea if there is any documentation for those.
> 
> It would really be rather silly if there were absolutely no way to tell
> what mode the module wants from the EEPROM..

It is something I've spent weeks looking at from many different angles.
There is no way to tell.

You have to bear in mind that 1000BaseX and SGMII are essentially
identical, except for the interpretation of that 16-bit control word
and how it is handled.  Both are 1250Mbaud, both are 8b/10b encoded.
Both identify as supporting 1000BASE-T.

As I've said, the only way I can come up with is a hard-coded table
of vendor name/part number to identify what each one requires.

-- 
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-06-07 18:34 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-31 19:18 [PATCH net-next] net: sfp: Set 1000BaseX support flag for 1000BaseT modules Robert Hancock
2019-05-31 19:18 ` [PATCH net-next] net: sfp: Stop SFP polling during shutdown Robert Hancock
2019-05-31 20:12   ` Russell King - ARM Linux admin
2019-05-31 22:40     ` Robert Hancock
2019-05-31 19:18 ` [PATCH net-next] net: sfp: Use smaller chunk size when reading I2C data Robert Hancock
2019-05-31 20:13   ` Russell King - ARM Linux admin
2019-05-31 19:18 ` [PATCH net-next] net: phy: phylink: add fallback from SGMII to 1000BaseX Robert Hancock
2019-05-31 20:18   ` Russell King - ARM Linux admin
2019-06-01  0:17     ` Robert Hancock
2019-06-02 15:15       ` Russell King - ARM Linux admin
2019-06-07 18:10         ` Robert Hancock
2019-06-07 18:34           ` Russell King - ARM Linux admin [this message]
2019-06-01  9:46   ` Sergei Shtylyov
2019-05-31 19:18 ` [PATCH net-next] net: phy: phylink: support using device PHY in fixed or 802.3z mode Robert Hancock
2019-05-31 19:29   ` David Miller
2019-05-31 19:41     ` Robert Hancock
2019-05-31 19:42       ` David Miller
2019-05-31 20:31   ` Russell King - ARM Linux admin
2019-06-01  0:33     ` Robert Hancock
2019-06-01 20:10       ` Russell King - ARM Linux admin
2019-06-07 18:15         ` Robert Hancock
2019-05-31 20:11 ` [PATCH net-next] net: sfp: Set 1000BaseX support flag for 1000BaseT modules Russell King - ARM Linux admin

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=20190607183436.af6h5lhw7nb3ycet@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=hancock@sedsystems.ca \
    --cc=netdev@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.