[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191116214042.GU25745@shell.armlinux.org.uk>
Date: Sat, 16 Nov 2019 21:40:42 +0000
From: Russell King - ARM Linux admin <linux@...linux.org.uk>
To: Andrew Lunn <andrew@...n.ch>
Cc: Florian Fainelli <f.fainelli@...il.com>,
Heiner Kallweit <hkallweit1@...il.com>,
"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: [PATCH net-next v2 3/3] net: phy: marvell10g: add SFP+ support
On Sat, Nov 16, 2019 at 05:06:35PM +0100, Andrew Lunn wrote:
> > +static int mv3310_sfp_insert(void *upstream, const struct sfp_eeprom_id *id)
> > +{
> > + struct phy_device *phydev = upstream;
> > + __ETHTOOL_DECLARE_LINK_MODE_MASK(support) = { 0, };
> > + phy_interface_t iface;
> > +
> > + sfp_parse_support(phydev->sfp_bus, id, support);
> > + iface = sfp_select_interface(phydev->sfp_bus, id, support);
> > +
> > + if (iface != PHY_INTERFACE_MODE_10GKR) {
> > + dev_err(&phydev->mdio.dev, "incompatible SFP module inserted\n");
> > + return -EINVAL;
> > + }
>
> Hi Russell
>
> Is it possible to put an SFP module into an SFP+ cage?
> sfp_select_interface() would then say 1000Base-X or 2500Base-X. The
> SFP+ cage has a single SERDES pair, so electrically, would it be
> possible to do 1000Base-X? Should mv3310_sfp_insert() be reconfiguring
> the PHY so the SFP side swaps to 1000Base-X?
The answer is... it depends.
Some SFP+ cages have stronger pull-ups and run the I2C bus at 400kHz.
SFP modules limit the pullups to 4.7k minimum and a bus speed of
100kHz.
Some SFP modules will stand the faster bus speed and the stronger
pull-ups. Others will not. Others may end up with EEPROM corruption.
It is possible to reconfigure the 3310 to 1000base-X (I don't think
2500base-X is possible on the fiber port) but it requires a PHY reset.
I have code to do it, but I haven't tested it - as the pullups on the
board I have to test with are too strong to allow the EEPROM in SFP
modules to be read.
If I get around to replacing the resistor packs, then I can test it,
but I'm not going to contribute completely untested code!
So, this patch reflects what can be done with the SFP+ slots on
Macchiatobin boards today.
--
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
Powered by blists - more mailing lists