From: Klaus Kudielka <klaus.kudielka@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: netdev@vger.kernel.org, "Florian Fainelli" <f.fainelli@gmail.com>,
"Heiner Kallweit" <hkallweit1@gmail.com>,
"Russell King" <linux@armlinux.org.uk>,
"Uwe Kleine-König" <uwe@kleine-koenig.org>,
"Tomas Hlavacek" <tmshlvck@gmail.com>
Subject: Re: [RFC] phylink: support for devices with MAC sharing SFP cage & PHY (e.g. Turris Omnia)
Date: Fri, 4 Jan 2019 07:26:19 +0100 [thread overview]
Message-ID: <90ce74ef-446c-9efd-7be4-43d180ceef85@gmail.com> (raw)
In-Reply-To: <20181231174306.GC3239@lunn.ch>
On 31.12.18 18:43, Andrew Lunn wrote:
>
> The Marvell documentation is not public. I would have to check, but
> i think there is a bit which tells you. But as Florian pointed out,
> this can be indirectly controlled from software, in that a PHY which
> is configured down will never get link, in the same way an SFP with
> its receiver disabled will never get link. So software to enable one
> or the other would work.
>
>> Such a "generic" solution would be restricted (per MAC) to a
>> maximum of one SFP (fiber or copper), and one separate PHY, right?
>> The main difference between boards would be the switching logic.
>
> Yes, that seems a sensible restriction.
>
I might be able come up with a re-work of phylink.c, such that it can
manage two independent link configurations, and reconfigure the MAC upon
a switch. The actual switching would be modeled in the various existing
callbacks, based on a board-specific recipe (for the moment
sfp-module-present or first-link). ethtool will probably just see the
"active" link (i.e. the PHY/SFP connected to the MAC).
As far as I can see, this would make both the Omnia SFP and the Marvell
switches work as they were designed, without any interface change.
Additional userspace-driven control could be added at a later time, if
it turns out to be necessary.
prev parent reply other threads:[~2019-01-04 6:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-30 8:25 [RFC] phylink: support for devices with MAC sharing SFP cage & PHY (e.g. Turris Omnia) Klaus Kudielka
2018-12-30 9:51 ` Andrew Lunn
2018-12-30 22:35 ` Florian Fainelli
2018-12-30 22:41 ` Andrew Lunn
2019-01-04 9:45 ` Russell King - ARM Linux
2018-12-31 11:24 ` Klaus Kudielka
2018-12-31 17:43 ` Andrew Lunn
2019-01-04 6:26 ` Klaus Kudielka [this message]
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=90ce74ef-446c-9efd-7be4-43d180ceef85@gmail.com \
--to=klaus.kudielka@gmail.com \
--cc=andrew@lunn.ch \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=tmshlvck@gmail.com \
--cc=uwe@kleine-koenig.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).