From: Andrew Lunn <andrew@lunn.ch>
To: Frantisek Rysanek <Frantisek.Rysanek@post.cz>
Cc: netdev@vger.kernel.org
Subject: Re: HW question: i210 vs. BCM5461S over SGMII: no response from PHY to MDIO requests?
Date: Wed, 21 Mar 2018 13:58:42 +0100 [thread overview]
Message-ID: <20180321125842.GA11206@lunn.ch> (raw)
In-Reply-To: <5AB2470E.24728.48DBA909@Frantisek.Rysanek.post.cz>
> I was also wondering if someone has written any kernel-space support
> for the SFP's. Sure enough, I've found lots of code by Russell King
> under drivers/net/phy. I started reading from sfp.c, went on to
> sfp-bus.c, next the phylink stuff... Answers lots of my questions.
> Clearly someone has "been there and done that" - I mean how to
> interpret SFP EEPROM bits and act upon them in the PHY
> initialization.
That is all quite new code. It has not spread too far yet. The Marvell
mvneta ethernet driver is using it, and the Clearfog is probably the
first in kernel board to make use of it. A few of us are working on
converting DSA over to using PHYLINK, since we have boards with
Ethernet switches and SFP connected to switch ports.
> There are notes in the phylib drivers that this is "platform" stuff
> - a keyword which speaks to me of stuff hardwired onboard in
> embedded motherboards (is Russell King the father of Linux on ARM
> ?), rather than general-purpose PnP and addon boards.
At the moment, PHYLIB pretty much relies on device tree to glue all
the parts together. There is no support for not using device tree at
the moment. It would need somebody to contribute that code.
The other issue is that the igb driver, like most of the intel
Ethernet drivers, ignore much of the Linux common MDIO/PHY and I2C
infrastructure, and does it all themselves. This is probably because
they share code with the Windoze driver.
> I'd love to use existing code of the phylib to talk to the SFP
> PHY's, maybe extend the phylib a bit (with the phy's I have), rather
> than cobble together something crude and private on my own, inside
> the igb driver.
So this is quite a big job, to do it cleanly. You probably need to
retain the intel code for MDIO/PHY/I2C, but add an option to make use
of the Linux common MDIO/PHY/I2C infrastructure. Then you need to
extend PHYLINK with a non device tree way to configure it, and glue
all the parts together.
You can make it a bit easier by just throwing away all the intel
MDIO/PHY/I2C code, replacing it will Linux common code. But i expect
the Intel maintainers would then reject your changes. There is too
high a chance of introducing regressions.
Andrew
next prev parent reply other threads:[~2018-03-21 12:58 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-21 11:50 HW question: i210 vs. BCM5461S over SGMII: no response from PHY to MDIO requests? Frantisek Rysanek
2018-03-21 12:58 ` Andrew Lunn [this message]
2018-03-21 14:07 ` Frantisek Rysanek
-- strict thread matches above, loose matches on Subject: below --
2018-03-17 22:12 Frantisek Rysanek
2018-03-18 14:40 ` Andrew Lunn
2018-03-20 9:02 ` Frantisek Rysanek
2018-03-20 12:09 ` Andrew Lunn
2018-03-20 12:23 ` Frantisek Rysanek
2018-03-21 10:47 ` Frantisek Rysanek
2018-03-21 13:08 ` Andrew Lunn
2018-03-20 12:02 ` Frantisek Rysanek
2018-03-16 16:48 Frantisek Rysanek
2018-03-16 18:42 ` Andrew Lunn
2018-03-16 20:40 ` Frantisek Rysanek
2018-03-16 21:02 ` Andrew Lunn
2018-03-17 7:39 ` Frantisek Rysanek
2018-03-17 14:50 ` Andrew Lunn
2018-03-17 15:20 ` Frantisek Rysanek
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=20180321125842.GA11206@lunn.ch \
--to=andrew@lunn.ch \
--cc=Frantisek.Rysanek@post.cz \
--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).