From: Russell King - ARM Linux admin <linux@armlinux.org.uk>
To: Vladimir Oltean <olteanv@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <jakub.kicinski@netronome.com>,
Andrew Lunn <andrew@lunn.ch>,
Florian Fainelli <f.fainelli@gmail.com>,
Vivien Didelot <vivien.didelot@gmail.com>,
Alexandru Marginean <alexandru.marginean@nxp.com>,
Claudiu Manoil <claudiu.manoil@nxp.com>,
Xiaoliang Yang <xiaoliang.yang_1@nxp.com>,
"Y.b. Lu" <yangbo.lu@nxp.com>, netdev <netdev@vger.kernel.org>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Horatiu Vultur <horatiu.vultur@microchip.com>,
Vladimir Oltean <vladimir.oltean@nxp.com>
Subject: Re: [RFC PATCH v2 0/8] Convert Felix DSA switch to PHYLINK
Date: Wed, 18 Dec 2019 13:29:42 +0000 [thread overview]
Message-ID: <20191218132942.GU25745@shell.armlinux.org.uk> (raw)
In-Reply-To: <CA+h21hrbqggYxzd6SGhBmy3fUbmG2EFqbOHAnkDu8xPYRP7ewg@mail.gmail.com>
On Wed, Dec 18, 2019 at 03:21:02PM +0200, Vladimir Oltean wrote:
> - The at803x.c driver explicitly checks for the ACK from the MAC PCS,
> and prints "SGMII link is not ok" otherwise, and refuses to bring the
> link up. This hurts us in 4.19 because I think the check is a bit
> misplaced in the .aneg_done callback. To be precise, what we observe
> is that this function is not called by the state machine a second,
> third time etc to recheck if the AN has completed in the meantime. In
> current net-next, as far as I could figure out, at803x_aneg_done is
> dead code. What is ironic about the commit f62265b53ef3 ("at803x:
> double check SGMII side autoneg") that introduced this function is
> that it's for the gianfar driver (Freescale eTSEC), a MAC that has
> never supported reprogramming itself based on the in-band config word.
> In fact, if you look at gfar_configure_serdes, it even configures its
> register 0x4 with an advertisement for 1000Base-X, not SGMII (0x4001).
> So I really wonder if there is any real purpose to this check in
> at803x_aneg_done, and if not, I would respectfully remove it.
Please check whether at803x will pass data if the SGMII config exchange
has not completed - I'm aware of some PHYs that, although link comes up
on the copper side, if AN does not complete on the SGMII side, they
will not pass data, even if the MAC side is forced up.
I don't see any configuration bits in the 8031 that suggest the SGMII
config exchange can be bypassed.
> - The vsc8514 PHY driver configures SerDes AN in U-Boot, but not in
> Linux. So we observe that if we disable PHY configuration in U-Boot,
> in-band AN breaks in Linux. We are actually wondering how we should
> fix this: from what you wrote above, it seems ok to hardcode SGMII AN
> in the PHY driver, and just ignore it in the PCS if managed =
> "in-band-status" is not set with PHYLINK. But as you said, in the
> general case maybe not all PHYs work until they haven't received the
> ACK from the MAC PCS, which makes this insufficient as a general
> solution.
>
> But the 2 cases above illustrate the lack of consistency among PHY
> drivers w.r.t. in-band aneg.
Indeed - it's something of a mine field at the moment, because we aren't
quite sure whether "SGMII" means that the PHY requires in-band AN or
doesn't provide it. For the Broadcom case I mentioned, when it's used on
a SFP, I've had to add a quirk to phylink to work around it.
The problem is, it's not a case that the MAC can demand that the PHY
provides in-band config - some PHYs are incapable of doing so. Whatever
solution we come up with needs to be a "negotiation" between the PHY
driver and the MAC driver for it to work well in the known scenarios -
like the case with the Broadcom PHY on a SFP that can be plugged into
any SFP supporting network interface...
--
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-18 13:30 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-17 22:18 [RFC PATCH v2 0/8] Convert Felix DSA switch to PHYLINK Vladimir Oltean
2019-12-17 22:18 ` [RFC PATCH v2 1/8] mii: Add helpers for parsing SGMII auto-negotiation Vladimir Oltean
2019-12-18 18:50 ` Russell King - ARM Linux admin
2019-12-19 9:10 ` Andrew Lunn
2019-12-17 22:18 ` [RFC PATCH v2 2/8] net: phylink: make QSGMII a valid PHY mode for in-band AN Vladimir Oltean
2019-12-17 22:18 ` [RFC PATCH v2 3/8] net: phylink: call mac_an_restart for SGMII/QSGMII inband interfaces too Vladimir Oltean
2019-12-17 23:25 ` Russell King - ARM Linux admin
2019-12-17 22:18 ` [RFC PATCH v2 4/8] enetc: Make MDIO accessors more generic and export to include/linux/fsl Vladimir Oltean
2019-12-17 23:39 ` Jakub Kicinski
2019-12-17 22:18 ` [RFC PATCH v2 5/8] enetc: Set MDIO_CFG_HOLD to the recommended value of 2 Vladimir Oltean
2019-12-17 22:18 ` [RFC PATCH v2 6/8] net: mscc: ocelot: make phy_mode a member of the common struct ocelot_port Vladimir Oltean
2019-12-17 22:18 ` [RFC PATCH v2 7/8] net: mscc: ocelot: export ANA, DEV and QSYS registers to include/soc/mscc Vladimir Oltean
2019-12-17 22:18 ` [RFC PATCH v2 8/8] net: dsa: felix: Add PCS operations for PHYLINK Vladimir Oltean
2019-12-18 10:40 ` [RFC PATCH v2 0/8] Convert Felix DSA switch to PHYLINK Russell King - ARM Linux admin
2019-12-18 13:21 ` Vladimir Oltean
2019-12-18 13:29 ` Russell King - ARM Linux admin [this message]
2019-12-18 15:00 ` Alexandru Marginean
2019-12-18 17:22 ` Russell King - ARM Linux admin
2019-12-18 20:15 ` Alexandru Marginean
2019-12-18 23:21 ` Russell King - ARM Linux admin
2019-12-19 11:38 ` Alexandru Marginean
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=20191218132942.GU25745@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=alexandre.belloni@bootlin.com \
--cc=alexandru.marginean@nxp.com \
--cc=andrew@lunn.ch \
--cc=claudiu.manoil@nxp.com \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=horatiu.vultur@microchip.com \
--cc=jakub.kicinski@netronome.com \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=vivien.didelot@gmail.com \
--cc=vladimir.oltean@nxp.com \
--cc=xiaoliang.yang_1@nxp.com \
--cc=yangbo.lu@nxp.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).