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: Sun, 17 Nov 2019 19:59:57 +0000 [thread overview]
Message-ID: <20191117195957.GV25745@shell.armlinux.org.uk> (raw)
In-Reply-To: <20191117192529.GB4084@lunn.ch>
On Sun, Nov 17, 2019 at 08:25:29PM +0100, Andrew Lunn wrote:
> > The answer is... it depends.
>
> Hi Russell
>
> One issue we have had with phylink is people using the interfaces
> wrongly. When asking this question, i was thinking about
> documentation. Your answer suggests this method is not simply about
> the validation you are doing here, it could also be about
> configuration of the PHY to fit the module.
Err.
Is that not what phylink_sfp_module_insert() is doing - validating that
the module can be supported by the MAC and setting the MAC up for it.
The implementation for marvell10g is no different - I'm not sure why
you're thinking something else is going on here.
> Maybe it would be good to add documentation somewhere about the range
> of things this call can do?
>
> > So, this patch reflects what can be done with the SFP+ slots on
> > Macchiatobin boards today.
>
> This all sounds very hardware dependent. So we are going to need some
> more DT properties i guess. Have you thought about this?
I don't see how DT properties help.
DT properties can't stop you plugging in a SFP module into a SFP+ slot
with too strong pullups and corrupting the EEPROM on the SFP module.
There's nothing that really tells you that the module is SFP or SFP+,
and if we wanted to guess, we'd need to read the EEPROM... but reading
the EEPROM might corrupt it - catch-22.
> Maybe we need to add compatibles sff,sfp+ and sff,sff+ ? Indicate the
> board is capable of the higher speeds? And when sfp+/sff+ is used,
> maybe a boolean to indicate it is also sff/sfp compatible?
I've had a patch like that hanging around for a few years. I've yet to
find anything that could benefit from it or use it to make some kind of
decision in the code.
> sfp_select_interface() can then look at these properties and return
> PHY_INTERFACE_MODE_NA if the board is not capable of supporting the
> module?
>
> Would it even make sense to make the PHY interface more like the MAC
> interface? A validate function to indicate what it is capable of? A
> configure function to configure its mode towards the SFP?
I don't see how any of that helps. The problem is not whether the
PHY interface mode is supported it not - on the Macchiatobin DS, the
88x3310 PHY certainly supports 10GBASE-R and 1000BASE-X via the fiber
port. So it's entirely possible to configure the 3310 to drive a
1G fiber SFP.
The problem on the Macchiatobin is the I2C pull-up resistors, which
either prevent a SFP module being readable or end up corrupting the
SFP module EEPROM in the process of trying (and probably failing) to
read it. There is nothing the kernel can do to work around that.
--
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-17 20:00 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
2019-11-17 19:25 ` Andrew Lunn
2019-11-17 19:59 ` Russell King - ARM Linux admin [this message]
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=20191117195957.GV25745@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).