From: Russell King - ARM Linux admin <linux@armlinux.org.uk>
To: Milind Parab <mparab@cadence.com>
Cc: "nicolas.nerre@microchip.com" <nicolas.nerre@microchip.com>,
"antoine.tenart@bootlin.com" <antoine.tenart@bootlin.com>,
"f.fainelli@gmail.com" <f.fainelli@gmail.com>,
"davem@davemloft.net" <davem@davemloft.net>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"hkallweit1@gmail.com" <hkallweit1@gmail.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Dhananjay Vilasrao Kangude <dkangude@cadence.com>,
"a.fatoum@pengutronix.de" <a.fatoum@pengutronix.de>,
"brad.mouring@ni.com" <brad.mouring@ni.com>,
Parshuram Raju Thombare <pthombar@cadence.com>
Subject: Re: [PATCH 3/3] net: macb: add support for high speed interface
Date: Wed, 11 Dec 2019 09:37:08 +0000 [thread overview]
Message-ID: <20191211093708.GZ25745@shell.armlinux.org.uk> (raw)
In-Reply-To: <BY5PR07MB65147AEF32345E351E920188D35A0@BY5PR07MB6514.namprd07.prod.outlook.com>
[private email content deleted, added Cc list back since this is
important.]
I'm still not getting a good enough view of what you are doing and
how my understanding of your hardware fits with what you're doing
with the software.
My understanding is it's something like:
----+
SOC | PCS
MAC --(USXGMII)-- PHY ----- PHY or SFP
|
----+
And you are just modelling the MAC part in phylink, where as phylink
has so far been used on systems which have this model - where phylink
knows about both the MAC and the PCS PHY:
---------------+
PCS |
MAC ---- PHY ----- PHY or SFP
SOC |
---------------+
This is why I recently renamed mac_link_state() to mac_pcs_get_state()
to make it clearer that it reads from the PCS not from the current
settings of the MAC. So far, all such setups do not implement the PCS
PHY as an 802.3 register set; they implement it as part of the MAC
register set.
In the former case, if phylink is used to manage the connection between
the MAC and the PCS PHY, phylink has nothing to do with the SFP at all.
In the latter case, phylink is used to manage the connection between the
PCS PHY and external device, controlling the MAC as appropriate.
My problem is I believe your hardware is the former case, but you are
trying to implement the latter case by ignoring in-band mode. As SFPs
rely on in-band mode, that isn't going to work.
The options for the former case are:
1) implement phylink covering both the MAC and the external PCS PHY
2) implement phylink just for the MAC to PCS PHY connection but not
SFPs, and implement SFP support separately in the PCS PHY driver.
Maybe phylink needs to split mac_pcs_get_state() so it can be supplied
by a separate driver, or by the MAC driver as appropriate - but that
brings with it other problems; phylink with a directly attached SFP
considers the state of the link between the PCS PHY and the external
device - not only speed but also interface mode for that part of the
link. What you'd see in the mac_config() callback are interface modes
for that part of the link, not between the MAC and the PCS PHY.
To change that would require reworking almost every driver that has
already converted over to somehow remodel the built-in PCS and
COMPHY as a separate PCS PHY for phylink. I'm not entirely clear
whether that would work though.
--
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-12-11 9:37 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-09 11:13 [PATCH 0/3] net: macb: fix for fixed link, support for c45 mdio and 10G Milind Parab
2019-12-09 11:14 ` [PATCH 1/3] net: macb: fix for fixed-link mode Milind Parab
2019-12-09 11:26 ` Russell King - ARM Linux admin
2019-12-10 9:14 ` Milind Parab
2019-12-10 11:38 ` Russell King - ARM Linux admin
2019-12-11 8:21 ` Milind Parab
2019-12-09 11:15 ` [PATCH 2/3] net: macb: add support for C45 MDIO read/write Milind Parab
2019-12-09 11:16 ` [PATCH 3/3] net: macb: add support for high speed interface Milind Parab
2019-12-09 11:36 ` Russell King - ARM Linux admin
2019-12-10 11:20 ` Milind Parab
2019-12-10 13:33 ` Andrew Lunn
2019-12-11 9:20 ` Milind Parab
[not found] ` <20191210114053.GU25745@shell.armlinux.org.uk>
[not found] ` <BY5PR07MB65147AEF32345E351E920188D35A0@BY5PR07MB6514.namprd07.prod.outlook.com>
2019-12-11 9:37 ` Russell King - ARM Linux admin [this message]
2019-12-11 11:55 ` Milind Parab
-- strict thread matches above, loose matches on Subject: below --
2019-11-26 9:09 [PATCH 0/3] net: macb: cover letter Milind Parab
2019-11-26 9:09 ` [PATCH 3/3] net: macb: add support for high speed interface Milind Parab
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=20191211093708.GZ25745@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=a.fatoum@pengutronix.de \
--cc=antoine.tenart@bootlin.com \
--cc=brad.mouring@ni.com \
--cc=davem@davemloft.net \
--cc=dkangude@cadence.com \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mparab@cadence.com \
--cc=netdev@vger.kernel.org \
--cc=nicolas.nerre@microchip.com \
--cc=pthombar@cadence.com \
/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).