From: Russell King - ARM Linux admin <linux@armlinux.org.uk>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
Heiner Kallweit <hkallweit1@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
netdev@vger.kernel.org
Subject: Re: [PATCH net-next v2 3/3] net: phy: marvell10g: add SFP+ support
Date: Sat, 16 Nov 2019 21:40:42 +0000 [thread overview]
Message-ID: <20191116214042.GU25745@shell.armlinux.org.uk> (raw)
In-Reply-To: <20191116160635.GB5653@lunn.ch>
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
next prev parent reply other threads:[~2019-11-16 21:40 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-15 19:53 [PATCH net-next v2 0/3] Add support for SFPs behind PHYs Russell King - ARM Linux admin
2019-11-15 19:56 ` [PATCH net-next v2 1/3] dt-bindings: net: add ethernet controller and phy sfp property Russell King
2019-11-16 0:34 ` Rob Herring
2019-11-16 16:08 ` Andrew Lunn
2019-11-15 19:56 ` [PATCH net-next v2 2/3] net: phy: add core phylib sfp support Russell King
2019-11-16 16:08 ` Andrew Lunn
2019-11-15 19:56 ` [PATCH net-next v2 3/3] net: phy: marvell10g: add SFP+ support Russell King
2019-11-16 16:06 ` Andrew Lunn
2019-11-16 21:40 ` Russell King - ARM Linux admin [this message]
2019-11-17 19:25 ` Andrew Lunn
2019-11-17 19:59 ` Russell King - ARM Linux admin
2019-11-19 0:56 ` [PATCH net-next v2 0/3] Add support for SFPs behind PHYs David Miller
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=20191116214042.GU25745@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--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 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).