On Mon, Mar 19, 2018 at 01:19:24PM +0000, Stefan Chulski wrote: > > > > -----Original Message----- > > From: Andrew Lunn [mailto:and...@lunn.ch] > > Sent: Monday, March 19, 2018 3:08 PM > > To: Stefan Chulski <stef...@marvell.com> > > Cc: Antoine Tenart <antoine.ten...@bootlin.com>; Russell King - ARM Linux > > <li...@armlinux.org.uk>; da...@davemloft.net; kis...@ti.com; > > gregory.clem...@bootlin.com; ja...@lakedaemon.net; > > sebastian.hesselba...@gmail.com; netdev@vger.kernel.org; linux- > > ker...@vger.kernel.org; thomas.petazz...@bootlin.com; > > maxime.chevall...@bootlin.com; miquel.ray...@bootlin.com; Nadav Haklai > > <nad...@marvell.com>; Yan Markman <ymark...@marvell.com>; > > m...@semihalf.com; linux-arm-ker...@lists.infradead.org > > Subject: Re: [EXT] Re: [PATCH net-next 02/10] net: phy: phylink: allow 10GKR > > interface to use in-band negotiation > > > > > > If they don't have PHYs, how are the connected to the outside world? > > > > > > > > Andrew > > > > > > By external SFP or direct attached cable. > > > > Maybe i'm missing something, but don't you just need to add an SFP device > > in the device tree. The SFP code and PHYLINK will work together, query what > > the SFP module is, use the GPIOs to determine link up/down and module > > present, and tell the MAC how to configure the MAC-SFP link? > > > > Andrew > > phylink pool SFP loss signal to determine link up/down?
No. Phylink was merged along with SFP cage support, which includes a DT description for SFP cages, including the various signals for the cage. The SFP layer will take care of monitoring the cage and conveying state information to Phylink. Phylink's job is to work out how any SFP module, PHY and MAC should be configured and to determine the link state based on information supplied by or requested from each depending on the configured state. Please do not try and support SFP cages as fixed links. They aren't, and such an approach will always have sub-standard link state monitoring. In an optical setup, the SFP LOS signal just indicates whether there is sufficient optical power present at the receiver. It doesn't indicate whether there is a valid signal there, or whether the chip at the other end of the serdes link can decode the signal. That has to come from the upstream chip, whether it be a PHY or a MAC. SFP optical modules do not perform protocol validation - they merely convert the serdes electrical signal into a light signal and back again, with varying amounts of monitoring on board. -- RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line in suburbia: sync at 8.8Mbps down 630kbps up According to speedtest.net: 8.21Mbps down 510kbps up