From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Sean Anderson <sean.anderson@seco.com>
Cc: Tim Harvey <tharvey@gateworks.com>,
netdev <netdev@vger.kernel.org>,
"David S. Miller" <davem@davemloft.net>
Subject: Re: status of rate adaptation
Date: Sat, 12 Nov 2022 13:15:46 +0000 [thread overview]
Message-ID: <Y2+cgh4NBQq8EHoX@shell.armlinux.org.uk> (raw)
In-Reply-To: <b7f31077-c72d-5cd4-30d7-e3e58bb63059@seco.com>
On Fri, Nov 11, 2022 at 04:54:40PM -0500, Sean Anderson wrote:
> > [ 8.911932] mvpp2 f2000000.ethernet eth0: PHY
> > [f212a600.mdio-mii:08] driver [Aquantia AQR113C] (irq=POLL)
> > [ 8.921577] mvpp2 f2000000.ethernet eth0: phy: 10gbase-r setting
> > supported 00000000,00018000,000e706f advertising
> > 00000000,00018000,000e706f
> > # ethtool eth0
> > Settings for eth0:
> > Supported ports: [ ]
> > Supported link modes: 10baseT/Half 10baseT/Full
> > 100baseT/Half 100baseT/Full
>
> 10/100 half duplex aren't achievable with rate matching (and we avoid
> turning them on), so they must be coming from somewhere else. I wonder
> if this is because PHY_INTERFACE_MODE_SGMII is set in
> supported_interfaces.
The reason is due to the way phylink_bringup_phy() works. This is
being called with interface = 10GBASE-R, and the PHY is a C45 PHY,
which means we call phy_get_rate_matching() with
PHY_INTERFACE_MODE_NA as we don't know whether the PHY will be
switching its interface or not.
Looking at the Aquanta PHY driver, this will return that pause mode
rate matching will be used, so config.rate_matching will be
RATE_MATCH_PAUSE.
phylink_validate() will be called for PHY_INTERFACE_MODE_NA, which
causes it to scan all supported interface modes (as again, we don't
know which will be used by the PHY [*]) and the union of those
results will be used.
So when we e.g. try SGMII mode, caps & mac_capabilities will allow
the half duplex modes through.
Now for the bit marked with [*] - at this point, if rate matching is
will be used, we in fact know which interface mode is going to be in
operation, and it isn't going to change. So maybe we need this instead
in phylink_bringup_phy():
- if (phy->is_c45 &&
+ config.rate_matching = phy_get_rate_matching(phy, interface);
+ if (phy->is_c45 && config.rate_matching == RATE_MATCH_NONE &&
interface != PHY_INTERFACE_MODE_RXAUI &&
interface != PHY_INTERFACE_MODE_XAUI &&
interface != PHY_INTERFACE_MODE_USXGMII)
config.interface = PHY_INTERFACE_MODE_NA;
else
config.interface = interface;
- config.rate_matching = phy_get_rate_matching(phy, config.interface);
ret = phylink_validate(pl, supported, &config);
?
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
next prev parent reply other threads:[~2022-11-12 13:15 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-11 20:44 status of rate adaptation Tim Harvey
2022-11-11 20:57 ` Sean Anderson
2022-11-11 20:58 ` Sean Anderson
2022-11-11 21:20 ` Tim Harvey
2022-11-11 21:54 ` Sean Anderson
2022-11-11 22:14 ` Tim Harvey
2022-11-11 22:38 ` Sean Anderson
2022-11-12 0:48 ` Vladimir Oltean
2022-11-12 16:08 ` Andrew Lunn
2022-11-14 15:08 ` Sean Anderson
2022-11-14 19:33 ` Tim Harvey
2022-11-16 22:37 ` Tim Harvey
2022-11-17 15:38 ` Sean Anderson
2022-11-17 23:42 ` Tim Harvey
2022-11-28 19:57 ` Sean Anderson
2022-12-01 1:11 ` Tim Harvey
2022-11-11 22:33 ` Russell King (Oracle)
2022-11-12 13:15 ` Russell King (Oracle) [this message]
2022-11-14 15:33 ` Sean Anderson
2022-11-14 16:13 ` Russell King (Oracle)
2022-11-18 18:16 ` Sean Anderson
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=Y2+cgh4NBQq8EHoX@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=sean.anderson@seco.com \
--cc=tharvey@gateworks.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).